예제 #1
0
 /**
  * @param	array $data	
  * @return	PackageManifest
  */
 public function __construct(array $data, $vendor = null)
 {
     $this->setValidType('view');
     parent::__construct($data, $vendor);
     if (!isset($data['markup'])) {
         $err = 'for any view pacakge the markup file must be set';
         throw new DomainException($err);
     }
     $this->setMarkupFile($data['markup']);
     if (isset($data['is-jsview']) && true === $data['is-jsview']) {
         $this->isJsView = true;
     }
 }
예제 #2
0
 /**
  * @param	array $data	
  * @return	PackageManifest
  */
 public function __construct(array $data, $vendor = null)
 {
     parent::__construct($data, $vendor);
     $docName = 'htmldoc.default-html';
     if (isset($data['htmldoc'])) {
         $docName = $data['htmldoc'];
     }
     $this->setHtmlDocName($docName, $vendor);
     if (isset($data['theme'])) {
         $this->setThemeName($data['theme'], $vendor);
     }
     if (!isset($data['markup'])) {
         $err = "all html page views must declare a markup file using key ";
         $err .= "-(markup): none found";
         throw new DomainException($err);
     }
     $this->setMarkupFile($data['markup']);
     if (isset($data['init'])) {
         $this->setJsInitFile($data['init']);
     }
     if (isset($data['layers'])) {
         $this->setLayers($data['layers'], $vendor);
     }
 }