Advertisement
Guest User

PackageInterface.php

a guest
Jun 12th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.76 KB | None | 0 0
  1. <?php
  2. namespace Neos\Flow\Package;
  3.  
  4. /*
  5.  * This file is part of the Neos.Flow package.
  6.  *
  7.  * (c) Contributors of the Neos Project - www.neos.io
  8.  *
  9.  * This package is Open Source Software. For the full copyright and license
  10.  * information, please view the LICENSE file which was distributed with this
  11.  * source code.
  12.  */
  13.  
  14. /**
  15.  * Interface for a basic Package class
  16.  *
  17.  * @api
  18.  */
  19. interface PackageInterface
  20. {
  21.     const PATTERN_MATCH_PACKAGEKEY = '/^[a-z0-9]+\.(?:[a-z0-9][\.a-z0-9]*)+$/i';
  22.     const DEFAULT_COMPOSER_TYPE = 'neos-package';
  23.  
  24.     /**
  25.      * Returns the array of filenames of the class files
  26.      *
  27.      * @return array An array of class names (key) and their filename, including the relative path to the package's directory
  28.      * @api
  29.      */
  30.     public function getClassFiles();
  31.  
  32.     /**
  33.      * Returns the composer name of this package.
  34.      *
  35.      * @return string
  36.      * @api
  37.      */
  38.     public function getComposerName();
  39.  
  40.     /**
  41.      * Returns an array of all namespaces declared for this package.
  42.      *
  43.      * @return array
  44.      * @api
  45.      */
  46.     public function getNamespaces();
  47.  
  48.     /**
  49.      * Returns the full path to this package's main directory
  50.      *
  51.      * @return string Path to this package's main directory
  52.      * @api
  53.      */
  54.     public function getPackagePath();
  55.  
  56.  
  57.     /**
  58.      * Returns the currently installed version of this package.
  59.      *
  60.      * @return string
  61.      * @api
  62.      */
  63.     public function getInstalledVersion();
  64.  
  65.     /**
  66.      * Returns the composer manifest of this package or
  67.      * just contents of a specific key of the full configuration.
  68.      *
  69.      * @param string $key
  70.      * @return mixed
  71.      * @api
  72.      */
  73.     public function getComposerManifest($key = null);
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement