summaryrefslogtreecommitdiffstats
path: root/examples/class/object.class.php
blob: 6c036ed5d6088efab541eb4e69c2ecc47f1578e0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php

abstract class Object extends Framework
{
    /*
     * Get URL to this object
     */
    function getURL()
    {
        return $this->ar() . "/" . $this->guid;
    }

    /*
     * Get object's head image
     */
    function getHeadImage()
    {
        return $this->ar() . "/file.php?d=img/heads&f=" . $this->guid;
    }

    /*
     * Remove this object's head image
     */
    function rmHeadImage()
    {
        if (!is_file("assets/img/heads/" . $this->guid))
            return true;

        return unlink("assets/img/heads/" . $this->guid);
    }
}

?>