protected function loadDefinitionFromFile(/*# string */ $file)/*# : array */
    {
        // check first
        $this->checkFileExistence($file);

        // get definition type and loader class base on suffix
        list($type, $class) = $this->getFileTypeClass($file);

        // load into an array
        $data = $class::loadFromFile($file);

        // associate with definition type
        return $type ? [$type => $data] : $data;
    }
protected function loadDefinitionFromFile(/*# string */ $file)/*# : array */
    {
        // check first
        $this->checkFileExistence($file);

        // get definition type and loader class base on suffix
        list($type, $class) = $this->getFileTypeClass($file);

        // load into an array
        $data = $class::loadFromFile($file);

        // associate with definition type
        return $type ? [$type => $data] : $data;
    }
protected function loadDefinitionFromFile ( /*# string */ $ file ) /*# : array */ { // check first $ this -> checkFileExistence ( $ file ) ; // get definition type and loader class base on suffix list ( $ type , $ class ) = $ this -> getFileTypeClass ( $ file ) ; // load into an array $ data = $ class :: loadFromFile ( $ file ) ; // associate with definition type return $ type ? [ $ type => $ data ] : $ data ; }
Load definitions from a file

@param  string $file definition file name
@return array
@throws NotFoundException if file not found
@throws LogicException if something goes wrong
@access protected
Load definitions from a file