"Fossies" - the Fresh Open Source Software Archive

Member "grav/system/src/Grav/Common/GPM/Local/AbstractPackageCollection.php" (8 Jun 2020, 609 Bytes) of package /linux/www/grav-v1.6.26.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "AbstractPackageCollection.php" see the Fossies "Dox" file reference documentation.

    1 <?php
    2 
    3 /**
    4  * @package    Grav\Common\GPM
    5  *
    6  * @copyright  Copyright (C) 2015 - 2019 Trilby Media, LLC. All rights reserved.
    7  * @license    MIT License; see LICENSE file for details.
    8  */
    9 
   10 namespace Grav\Common\GPM\Local;
   11 
   12 use Grav\Common\GPM\Common\AbstractPackageCollection as BaseCollection;
   13 
   14 abstract class AbstractPackageCollection extends BaseCollection
   15 {
   16     public function __construct($items)
   17     {
   18         parent::__construct();
   19 
   20         foreach ($items as $name => $data) {
   21             $data->set('slug', $name);
   22             $this->items[$name] = new Package($data, $this->type);
   23         }
   24     }
   25 }