application/Espo/Core/Utils/File/FileUnifier.php
protected function loadData($filePath, $returns = array())
    {
        if (file_exists($filePath)) {
            $content = $this->getFileManager()->getContents($filePath);
            $data = Json::getArrayData($content);
            if (empty($data)) {
                $GLOBALS['log']->warning('FileUnifier::unify() - Empty file or syntax error - ['.$filePath.']');
                return $returns;
            }

            return $data;
        }

        return $returns;
    }
protected function loadData($filePath, $returns = array())
    {
        if (file_exists($filePath)) {
            $content = $this->getFileManager()->getContents($filePath);
            $data = Json::getArrayData($content);
            if (empty($data)) {
                $GLOBALS['log']->warning('FileUnifier::unify() - Empty file or syntax error - ['.$filePath.']');
                return $returns;
            }

            return $data;
        }

        return $returns;
    }
protected function loadData ( $ filePath , $ returns = array ( ) ) { if ( file_exists ( $ filePath ) ) { $ content = $ this -> getFileManager ( ) -> getContents ( $ filePath ) ; $ data = Json :: getArrayData ( $ content ) ; if ( empty ( $ data ) ) { $ GLOBALS [ 'log' ] -> warning ( 'FileUnifier::unify() - Empty file or syntax error - [' . $ filePath . ']' ) ; return $ returns ; } return $ data ; } return $ returns ; }
Load data from a file

@param  string $filePath
@param  array  $returns
@return array
Load data from a file