src/DependencyEngine/DependenciesEngine.php
protected function parseProperties($propertiesDefinition, &$loadedDependencies = array()){
        $parseProperties= array();
        foreach ($propertiesDefinition as $key => $definition) {
            $property= NULL;
            if(isset($definition['ref'])){
                //Conseguimos la dependencia
                $property= $this->getDependency($definition['ref'], $loadedDependencies);
            }else{
                //Casteo el valor al tipo indicado
                $property= $definition['value'];
                if($definition['value'] != 'array'){
                    settype($property, $definition['type']);
                }
            }
            $parseProperties[$key]= $property;
        }
        return $parseProperties;
    }
protected function parseProperties($propertiesDefinition, &$loadedDependencies = array()){
        $parseProperties= array();
        foreach ($propertiesDefinition as $key => $definition) {
            $property= NULL;
            if(isset($definition['ref'])){
                //Conseguimos la dependencia
                $property= $this->getDependency($definition['ref'], $loadedDependencies);
            }else{
                //Casteo el valor al tipo indicado
                $property= $definition['value'];
                if($definition['value'] != 'array'){
                    settype($property, $definition['type']);
                }
            }
            $parseProperties[$key]= $property;
        }
        return $parseProperties;
    }
protected function parseProperties ( $ propertiesDefinition , & $ loadedDependencies = array ( ) ) { $ parseProperties = array ( ) ; foreach ( $ propertiesDefinition as $ key => $ definition ) { $ property = NULL ; if ( isset ( $ definition [ 'ref' ] ) ) { //Conseguimos la dependencia $ property = $ this -> getDependency ( $ definition [ 'ref' ] , $ loadedDependencies ) ; } else { //Casteo el valor al tipo indicado $ property = $ definition [ 'value' ] ; if ( $ definition [ 'value' ] != 'array' ) { settype ( $ property , $ definition [ 'type' ] ) ; } } $ parseProperties [ $ key ] = $ property ; } return $ parseProperties ; }
Parsea los valores en string al tipo que corresponda segun el valor y el tipo definido.
@param array $propertiesDefinition
@param array &$loadedDependencies
@return array
Parsea los valores en string al tipo que corresponda segun el valor y el tipo definido .