Ejemplo n.º 1
0
 /**
  * add library dependency
  * 
  * @param  object
  */
 function addLib(CodeGen_PECL_Dependency_Lib $lib)
 {
     $name = $lib->getName();
     if (isset($this->libs[$name])) {
         return PEAR::raiseError("library '{$name}' specified twice");
     }
     $this->libs[$name] = $lib;
     return true;
 }
Ejemplo n.º 2
0
 function tagstart_deps_with_lib($attr)
 {
     $err = $this->checkAttributes($attr, array("name", "platform", "path", "function"));
     if (PEAR::isError($err)) {
         return $err;
     }
     if (!isset($attr["name"])) {
         return PEAR::raiseError("");
     }
     if (!isset($attr["platform"])) {
         $attr["platform"] = "all";
     }
     $lib = new CodeGen_PECL_Dependency_Lib($attr["name"], $attr["platform"]);
     if (isset($attr['path'])) {
         $lib->setPath($attr['path']);
     }
     if (isset($attr['function'])) {
         $lib->setFunction($attr['function']);
     }
     $this->helper->addLib($lib);
 }