public function loadStructureFiles($path = null) {
        if (empty($path)) $path = $this->_structuresPath;

        $files = FSService::getInstance()->in($path, true)->find('*.yml', FSService::TYPE_FILE, FSService::HYDRATE_NAMES_PATH);
        $data  = array();
        //if (isset($files['structure.yml'])) {
        //    $data = Yaml::parse(file_get_contents($files['structure.yml']));
        //    if (is_null($data)) $data = array();
        //    unset($files['structure.yml']);
        //}
        foreach ($files as $file) {
            $modelData      = Yaml::parse(file_get_contents($file));
            $modelName      = !empty($modelData['model']) ? $modelData['model'] : substr($file, strrpos($file, '/') + 1, -4);
            $modelNamespace = "Entities";
            $data           = array_merge($data, array($modelNamespace . "\\" . ucfirst($modelName) => $modelData));
        }

        $data              = self::fixYamlStructures($data);
        $this->_structures = $data;
        return $this;
    }
public function loadStructureFiles($path = null) {
        if (empty($path)) $path = $this->_structuresPath;

        $files = FSService::getInstance()->in($path, true)->find('*.yml', FSService::TYPE_FILE, FSService::HYDRATE_NAMES_PATH);
        $data  = array();
        //if (isset($files['structure.yml'])) {
        //    $data = Yaml::parse(file_get_contents($files['structure.yml']));
        //    if (is_null($data)) $data = array();
        //    unset($files['structure.yml']);
        //}
        foreach ($files as $file) {
            $modelData      = Yaml::parse(file_get_contents($file));
            $modelName      = !empty($modelData['model']) ? $modelData['model'] : substr($file, strrpos($file, '/') + 1, -4);
            $modelNamespace = "Entities";
            $data           = array_merge($data, array($modelNamespace . "\\" . ucfirst($modelName) => $modelData));
        }

        $data              = self::fixYamlStructures($data);
        $this->_structures = $data;
        return $this;
    }
public function loadStructureFiles ( $ path = null ) { if ( empty ( $ path ) ) $ path = $ this -> _structuresPath ; $ files = FSService :: getInstance ( ) -> in ( $ path , true ) -> find ( '*.yml' , FSService :: TYPE_FILE , FSService :: HYDRATE_NAMES_PATH ) ; $ data = array ( ) ; //if (isset($files['structure.yml'])) { //    $data = Yaml::parse(file_get_contents($files['structure.yml'])); //    if (is_null($data)) $data = array(); //    unset($files['structure.yml']); //} foreach ( $ files as $ file ) { $ modelData = Yaml :: parse ( file_get_contents ( $ file ) ) ; $ modelName = ! empty ( $ modelData [ 'model' ] ) ? $ modelData [ 'model' ] : substr ( $ file , strrpos ( $ file , '/' ) + 1 , - 4 ) ; $ modelNamespace = "Entities" ; $ data = array_merge ( $ data , array ( $ modelNamespace . "\\" . ucfirst ( $ modelName ) => $ modelData ) ) ; } $ data = self :: fixYamlStructures ( $ data ) ; $ this -> _structures = $ data ; return $ this ; }
Loading structure from YAML files
First loading "structure.yml" if it exists

@param mixed $path Path where yaml are stored
@return $this
Loading structure from YAML files First loading structure . yml if it exists