예제 #1
0
 /**
  * [execute description]
  * @param  array
  * @return query
  */
 public function execute(array $pdoQuery)
 {
     try {
         $query = $this->pdo->prepare($pdoQuery["query"]);
         $query->execute($pdoQuery['fields']);
         return $query;
     } catch (PDOException $e) {
         rifException::instanceException(array('message' => $e->getMessage()));
     }
 }
예제 #2
0
	private function loadPlugin($plugin, hooks $hooks){
		$plugin = basename($plugin);
		$pluginObj = null;
		$rifPlugin = "rifPlugin";
		try{
			$pluginReflection = new ReflectionClass($plugin);
			$pluginObj = new $plugin();
			$pluginObj->plugin = new $rifPlugin();
			$pluginObj->plugin->hooks = $hooks;
			$methods = $pluginReflection->getMethods();
			foreach($methods as $method){
				$methodName = $this->getMethodName($method);
				if($methodName === "__hookVar"){
					$pluginObj->$methodName();
				}
			}
		}catch(ReflectionException $e){
			if($e->getCode() === -1){
				rifException::instanceException(array(
					'message' => $this->lng->__("Invalid Plugin __plugin__",array(
						"plugin" => $plugin
					))
				));
			}
		}
	}