Abstract function for load and loadOnce
@param mixed file
@param array $data
@param boolean $once
@return mixed

@throws \Exedra\Exception\NotFoundException
502219
protected function loadFile($file, $data, $once = false)
    {
        $file = $this->basePath.'/'.ltrim($file, '/\\');

        if(!file_exists($file))
            throw new \Exedra\Exception\NotFoundException("File [$file] not found");

        extract($data);

        if($once)
            return require_once $file;
        else
            return require $file;

    }
355005
protected function loadInstanceFromFile($file) {
        if(file_exists($file)) {
            $arguments = $this->getConfiguration() [ AbstractFileConfiguration::SERVICE_INIT_ARGUMENTS ] ?? NULL;

            $object = _context_less_require($file, $arguments, $this->serviceManager);
            if(is_object($object)) {
                $this->instance = $object;
                if(method_exists($object, 'setConfiguration') && ($cfg = $this->getConfiguration()[AbstractFileConfiguration::SERVICE_INIT_CONFIGURATION] ?? NULL))
                    $object->setConfiguration($cfg);
            }
            else {
                $e= new InvalidServiceException("Executation of file $file did not return an object");
                $e->setServiceName($this->serviceName);
                $e->setServiceObject($object);
                throw $e;
            }
        } else {
            $e = new FileNotFoundException("File $file does not exist");
            $e->setServiceName($this->serviceName);
            $e->setFilename($file);
            throw $e;
        }
    }
839787
public static function load(string $file, ?string $type = null) : array
    {
        if (isset($type))
        {
            if (isset(self::$classMap[$type]))
            {
                $class = self::$classMap[$type];

                $data = $class::load($file);
            }
            else
            {
                throw new Exception(
                    "There is no registered handler for the specified type "
                    .$type
                );
            }
        }
        else
        {
            self::registerSymfonyYaml();

            foreach (self::$classMap as $ext => $class)
            {
                if (preg_match('/[.]'.preg_quote($ext, '/').'$/i', $file))
                {
                    $data = $class::load($file);
                    break;
                }
            }
        }

        if ( ! isset($data))
        {
            throw new OptionLoaderException(
                "File $file does not appear to be valid"
            );
        }

        return $data;
    }
561759
public function loadClass($class)
    {
        if ((true === $this->apc && ($file = $this->findFileInApc($class))) or
            ($file = $this->findFile($class))
        ) {
            require_once $file;
        }
    }
1232133
public static function inc($path, $return = false, $once = false)
    {
        $path = Normalize::diskFullPath($path);

        if (!self::exist($path)) {
            return false;
        }

        if ($return) {
            return $once === true ? require_once($path) : require $path;
        } else {
            ($once == true) ? require_once($path) : require $path;
        }
    }
397459
public function load($helperName) {
        $helperFilePathUser = ROOT . DS . 'app' . DS . 'helpers' . DS . $helperName . '.php';
        $helperFilePathPff  = ROOT_LIB . DS . 'src' . DS . 'helpers' . DS . $helperName . '.php';

        $found = false;

        if (file_exists($helperFilePathUser)) {
            include_once($helperFilePathUser);
            $found = true;
        }
        if (file_exists($helperFilePathPff)) {
            include_once($helperFilePathPff);
            $found = true;
        }

        if (!($found)) {
            throw new HelperException("Helper not found: " . $helperName);
        }
        else {
            return true;
        }
    }
84583
public static function load($name){
		if(substr($name, 0, 7)!='csslib\\') return false;
		
		$filename =  __DIR__.'/src/'.implode('/', array_slice(explode('\\', $name), 1)).'.php';
		
		if(!file_exists($filename)) throw new \Exception('File "'.$filename.'" not found');
		
		require_once $filename;
		
		if(class_exists($name) || interface_exists($name)) return true;
		
		
		throw new \Exception('Class or Interface "'.$name.'" not exists');
	}
539387
private function loadView($file, $data = array(), $return = FALSE)
    {
        ob_start();
        if (file_exists($file) || file_exists(PUBLIC_DIR . $file))
        {
            # Preventing $data of this method to be passed to view.
            $__data = $data;
            unset($data);

            # Merging with already added data to class property.
            $___data = array_merge($this->view_data, $__data);

            if ($this->is_smarty)
            {
                $this->enableSmarty();
                foreach ($___data as $key => $value)
                {
                    $this->smarty->assign($key, $value);
                }
                $this->smarty->display($file);
            }
            else
            {
                extract($___data);

                # Now we don't want __data and ___data.
                unset($__data, $___data);

                include $file;
            }
        }

        # Setting flag off.
        $this->is_smarty = FALSE;

        # Returning view if requested to return.
        if ($return === TRUE)
        {
            $content = ob_get_contents();
            ob_end_clean();
            return $content;
        }
    }
697210
public function load($data, $format = 'php')
    {
        if (!$data) {
            return $this;
        }

        if (\is_string($data) && \in_array($format, static::$formats, true)) {
            switch ($format) {
                case static::FORMAT_YML:
                    $this->loadYaml($data);
                    break;

                case static::FORMAT_JSON:
                    $this->loadJson($data);
                    break;

                case static::FORMAT_INI:
                    $this->loadIni($data);
                    break;

                case static::FORMAT_PHP:
                default:
                    $this->loadArray($data);
                    break;
            }

        } elseif (\is_array($data) || \is_object($data)) {
            $this->bindData($this->data, $data);
        }

        return $this;
    }
499185
public function load($data, $formName = null)
    {
        return $this->_isDataLoaded ?: $this->_isDataLoaded=true && parent::load($data, $formName);
    }
456748
public function renderizate($path, $file, $data = null)
    {
        $file = $path . $file . '.php';

        if ($data) {
            self::$data[self::setHash($file)] = $data;
        }

        require_once $file;

        return true;
    }
1367002
public static function load($data){
      $data = (object)$data;
      if (isset($data->head)) static::headers($data->head);
      if (isset($data->body)) static::body($data->body);
    }
894850
function load(string $file = null)
    {
        if ($file == null) {
            $file = static::$configFile;
        }
        if (!file_exists($file)) {
            return false;
        }

        $a = json_decode(file_get_contents($file));

        if (isset($a->css)) {
            $this->css = $a->css;
        }

        if (isset($a->js)) {
            $this->js = $a->js;
        }
        
        if (isset($a->jss)) {
            $this->jss = $a->jss;
        }
        
        return true;
    }
426437
public function load(array $data)
    {
        foreach ($data as $index => $value) {
            $this->set($index, $value);
        }
    }
999111
public function loadView($view, $data = array(), $mergeData = array())
    {
        $this->view = View::make($view, $data, $mergeData);
        return parent::loadView($view, $data, $mergeData);
    }
605369
public function load($key)
    {
        $fileName = $this->getCacheFilename($key);
        if (!is_file($fileName)) {
            return false;
        }

        require_once $fileName;

        return true;
    }
766412
protected function load($filename, $data = array(), $return = false)
    {
        $template = $this->createSubTemplate();

        try {
            return $template->renderTemplate($filename, $data, $return);
        } catch (\Exception $exception) {
            if (!empty($this->log))
            {
                $this->log->error("Failed to render template " . $filename, $exception);
            }
            return '';
        }
    }