Exemplo n.º 1
0
 public function __construct($type, $filename, $arguments = '')
 {
     $url = ASSETS_URI . $type . '/' . $filename;
     $this->setUrl($url);
     $this->setArguments($arguments);
     parent::__construct($type);
 }
Exemplo n.º 2
0
 public function __construct($type, $base, $action, $format = 'html', $arguments = '')
 {
     $this->setBase($base);
     $this->setAction($action);
     $this->setFormat($format);
     $this->setArguments($arguments);
     parent::__construct($type);
 }
Exemplo n.º 3
0
 public function __construct($type, $url, $arguments = '')
 {
     $this->setUrl($url);
     $this->setArguments($arguments);
     parent::__construct($type);
 }
Exemplo n.º 4
0
 public function __construct($type, $filename)
 {
     $this->setFilename($filename);
     parent::__construct($type);
 }
Exemplo n.º 5
0
Arquivo: Html.php Projeto: nabble/ajde
 public function addResource(Ajde_Resource $resource, $position = self::RESOURCE_POSITION_DEFAULT)
 {
     if ($position == self::RESOURCE_POSITION_TOP) {
         $resource->setPosition(self::RESOURCE_POSITION_FIRST);
     } else {
         $resource->setPosition($position);
     }
     // Check for duplicates
     // TODO: another option, replace current resource
     foreach ($this->_resources as $positionArray) {
         foreach ($positionArray as $item) {
             if ((string) $item == (string) $resource) {
                 return false;
             }
         }
     }
     if ($position === self::RESOURCE_POSITION_TOP) {
         array_unshift($this->_resources[self::RESOURCE_POSITION_FIRST], $resource);
     } else {
         $this->_resources[$position][] = $resource;
     }
     // Add to cache
     if ($resource instanceof Ajde_Resource_Local) {
         Ajde_Cache::getInstance()->addFile($resource->getFilename());
     }
     return true;
 }