[ Index ]

PHP Cross Reference of MantisBT

title

Body

[close]

/library/ezc/Base/src/structs/ -> repository_directory.php (source)

   1  <?php
   2  /**
   3   * File containing the ezcBaseRepositoryDirectory.
   4   *
   5   * @package Base
   6   * @version 1.8
   7   * @copyright Copyright (C) 2005-2009 eZ Systems AS. All rights reserved.
   8   * @license http://ez.no/licenses/new_bsd New BSD License
   9   */
  10  
  11  /**
  12   * Struct which defines a repository directory.
  13   *
  14   * @package Base
  15   * @version 1.8
  16   */
  17  class ezcBaseRepositoryDirectory extends ezcBaseStruct
  18  {
  19      /**
  20       * Specifies that the entry is for the eZ Components repository.
  21       */
  22      const TYPE_INTERNAL = 0;
  23  
  24      /**
  25       * Specifies that the entry is for an external (user defined) repository.
  26       */
  27      const TYPE_EXTERNAL = 1;
  28  
  29      /**
  30       * The $type is one of the two TYPE_* constants defined in this class.
  31       *
  32       * @var string
  33       */
  34      public $type;
  35  
  36      /**
  37       * The path to the configured repository.
  38       *
  39       * @var string
  40       */
  41      public $basePath;
  42  
  43      /**
  44       * The path to the autoload files.
  45       *
  46       * @var string
  47       */
  48      public $autoloadPath;
  49  
  50      /**
  51       * Constructs a new ezcBaseRepositoryDirectory of type $type with base path
  52       * $basePath and autoload path $autoloadPath.
  53       *
  54       * @param string $type
  55       * @param string $basePath
  56       * @param string $autoloadPath
  57       */
  58      public function __construct( $type, $basePath, $autoloadPath )
  59      {
  60          $this->type = $type;
  61          $this->basePath = $basePath;
  62          $this->autoloadPath = $autoloadPath;
  63      }
  64  
  65      /**
  66       * Returns a new instance of this class with the data specified by $array.
  67       *
  68       * $array contains all the data members of this class in the form:
  69       * array('member_name'=>value).
  70       *
  71       * __set_state makes this class exportable with var_export.
  72       * var_export() generates code, that calls this method when it
  73       * is parsed with PHP.
  74       *
  75       * @param array(string=>mixed) $array
  76       * @return ezcBaseRepositoryDirectory
  77       */
  78      static public function __set_state( array $array )
  79      {
  80          return new ezcBaseRepositoryDirectory( $array['type'], $array['basePath'], $array['autoloadPath'] );
  81      }
  82  }
  83  ?>


Generated: Thu Jul 28 15:48:31 2011 Cross-referenced by PHPXref 0.7