Exemplo n.º 1
0
 /**
  * Getter
  *
  * @param string $name
  *
  * @return mixed
  */
 public function __get($name)
 {
     switch ($name) {
         case 'name':
             $class_name = explode('\\', get_called_class());
             return strtolower($class_name[count($class_name) - 1]);
             break;
         case 'skeleton_file':
             return $this->distributor->path->assets . DIRECTORY_SEPARATOR . "{$this->name}.{$this->extension}";
             break;
         case 'dom':
             if (is_null($this->dom_instance)) {
                 $this->dom_instance = simplexml_load_file($this->skeleton_file);
             }
             return $this->dom_instance;
             break;
         case 'proper_path':
             return 'META-INF' . DIRECTORY_SEPARATOR . "{$this->name}.xml";
             break;
         default:
             return parent::__get($name);
             break;
     }
 }
Exemplo n.º 2
0
 /**
  * Constructor
  *
  * @param string $id
  */
 protected function __construct($id)
 {
     parent::__construct($id);
     // TODO: Change the autogenerated stub
     $this->html5 = new HTML5();
 }