PHP LoaderInterface Code Examples

This page contains top rated real world PHP examples of LoaderInterface extracted from open source projects. You can rate examples to help us improve the quality of examples
Example #1
Show file File: LazyArray.php Project: harp-orm/lazy-array
0
 /**
  * Call "load" on the loader. Initialize this array object with the result and return the array
  *
  * @return array|null
  */
 public function load()
 {
     if (false === $this->loaded) {
         $items = $this->loader->load();
         $this->exchangeArray($items);
         return $items;
     }
 }
Example #2
Show file File: ConfigurationProcessingLoader.php Project: vikey89/Sylius
0
 /**
  * {@inheritdoc}
  */
 public function load($identifier)
 {
     $rawConfiguration = $this->decoratedLoader->load($identifier);
     $configurations = [$rawConfiguration];
     if (isset($rawConfiguration['extra']['sylius-theme'])) {
         $configurations[] = $rawConfiguration['extra']['sylius-theme'];
     }
     return $this->configurationProcessor->process($configurations);
 }
Example #3
Show file File: FileCacheLoader.php Project: pinepain/php-simple-config
0
 /**
  * {@inheritdoc}
  */
 public function load()
 {
     if (!file_exists($this->cache_file)) {
         $items = $this->loader->load();
         $this->generateCache($this->cache_file, $items);
         return $items;
     }
     return require $this->cache_file;
 }
Example #4
Show file File: ArtifactRepository.php Project: shabbirvividads/magento2
0
 private function getComposerInformation(\SplFileInfo $file)
 {
     $zip = new \ZipArchive();
     $zip->open($file->getPathname());
     if (0 == $zip->numFiles) {
         return false;
     }
     $foundFileIndex = $zip->locateName('composer.json', \ZipArchive::FL_NODIR);
     if (false === $foundFileIndex) {
         return false;
     }
     $configurationFileName = $zip->getNameIndex($foundFileIndex);
     $composerFile = "zip://{$file->getPathname()}#{$configurationFileName}";
     $json = file_get_contents($composerFile);
     $package = JsonFile::parseJson($json, $composerFile);
     $package['dist'] = array('type' => 'zip', 'url' => $file->getRealPath(), 'reference' => $file->getBasename(), 'shasum' => sha1_file($file->getRealPath()));
     $package = $this->loader->load($package);
     return $package;
 }
Example #5
Show file File: LoaderResolver.php Project: Gregwar/symfony
0
 /**
  * Adds a loader.
  *
  * @param LoaderInterface $loader A LoaderInterface instance
  */
 public function addLoader(LoaderInterface $loader)
 {
     $this->loaders[] = $loader;
     $loader->setResolver($this);
 }
Frequently Used Methods