コード例 #1
0
ファイル: FunctionRegistryTest.php プロジェクト: poef/ariadne
 /**
  * @covers addFunction
  */
 public function testCustomFunction()
 {
     $registry = new ILess_FunctionRegistry();
     $registry->addFunction('foobar', array($this, 'foobarCallable'));
     $registry->call('foobar', array('a', 'b'));
 }
コード例 #2
0
ファイル: Environment.php プロジェクト: poef/ariadne
 /**
  * Sets the function registry, also links the registry with this environment instance
  *
  * @param ILess_FunctionRegistry $registry
  * @return ILess_Environment
  */
 public function setFunctionRegistry(ILess_FunctionRegistry $registry)
 {
     $this->functionRegistry = $registry;
     // provide access to the environment, which is need to access generateCSS()
     $this->functionRegistry->setEnvironment($this);
     return $this;
 }