protected function compileBinding(Binding $binding)
	{
		$prop = str_replace('\\', '_', $binding->getTypeName());
			
		$code = "\tpublic function binding_" . $prop . "() {\n\n";
		
		$code .= "\t\t\t\$binding = new DelegateBinding(" . var_export($binding->getTypeName(), true);
		$code .= ', ' . var_export($binding->getScope(), true);
		$code .= ', ' . var_export($binding->getOptions(), true) . ', function(InjectionPointInterface $point = NULL) {' . "\n";
		
		switch($binding->getOptions() & BindingInterface::MASK_TYPE)
		{
			case BindingInterface::TYPE_ALIAS:
				$code .= "return \$this->get(" . var_export($binding->getTarget(), true) . ", \$point);\n";
				break;
			case BindingInterface::TYPE_IMPLEMENTATION:
				$code .= $this->compileImplementationBinding($binding);
				break;
			case BindingInterface::TYPE_FACTORY_ALIAS:
				$code .= $this->compileFactoryBinding($binding);
				break;
			case BindingInterface::TYPE_FACTORY:
				$code .= $this->compileInlineFactoryBinding($binding);
		}
		
		$code .= "});\n";
		$code .= "\t\treturn \$binding;\n";
		$code .= "\t}\n\n";
		
		return $code;
	}
protected function compileBinding(Binding $binding)
	{
		$prop = str_replace('\\', '_', $binding->getTypeName());
			
		$code = "\tpublic function binding_" . $prop . "() {\n\n";
		
		$code .= "\t\t\t\$binding = new DelegateBinding(" . var_export($binding->getTypeName(), true);
		$code .= ', ' . var_export($binding->getScope(), true);
		$code .= ', ' . var_export($binding->getOptions(), true) . ', function(InjectionPointInterface $point = NULL) {' . "\n";
		
		switch($binding->getOptions() & BindingInterface::MASK_TYPE)
		{
			case BindingInterface::TYPE_ALIAS:
				$code .= "return \$this->get(" . var_export($binding->getTarget(), true) . ", \$point);\n";
				break;
			case BindingInterface::TYPE_IMPLEMENTATION:
				$code .= $this->compileImplementationBinding($binding);
				break;
			case BindingInterface::TYPE_FACTORY_ALIAS:
				$code .= $this->compileFactoryBinding($binding);
				break;
			case BindingInterface::TYPE_FACTORY:
				$code .= $this->compileInlineFactoryBinding($binding);
		}
		
		$code .= "});\n";
		$code .= "\t\treturn \$binding;\n";
		$code .= "\t}\n\n";
		
		return $code;
	}
protected function compileBinding ( Binding $ binding ) { $ prop = str_replace ( '\\' , '_' , $ binding -> getTypeName ( ) ) ; $ code = "\tpublic function binding_" . $ prop . "() {\n\n" ; $ code .= "\t\t\t\$binding = new DelegateBinding(" . var_export ( $ binding -> getTypeName ( ) , true ) ; $ code .= ', ' . var_export ( $ binding -> getScope ( ) , true ) ; $ code .= ', ' . var_export ( $ binding -> getOptions ( ) , true ) . ', function(InjectionPointInterface $point = NULL) {' . "\n" ; switch ( $ binding -> getOptions ( ) & BindingInterface :: MASK_TYPE ) { case BindingInterface :: TYPE_ALIAS : $ code .= "return \$this->get(" . var_export ( $ binding -> getTarget ( ) , true ) . ", \$point);\n" ; break ; case BindingInterface :: TYPE_IMPLEMENTATION : $ code .= $ this -> compileImplementationBinding ( $ binding ) ; break ; case BindingInterface :: TYPE_FACTORY_ALIAS : $ code .= $ this -> compileFactoryBinding ( $ binding ) ; break ; case BindingInterface :: TYPE_FACTORY : $ code .= $ this -> compileInlineFactoryBinding ( $ binding ) ; } $ code .= "});\n" ; $ code .= "\t\treturn \$binding;\n" ; $ code .= "\t}\n\n" ; return $ code ; }
Compiles PHP code for the given binding.

@param Binding $binding
@return string
Compiles PHP code for the given binding .