Beispiel #1
0
 /**
  * Add values to array property. Method has 'add' prefix.
  *
  * @param $object
  * @param $method
  * @param $values
  */
 public static function addToArray($object, $method, $values)
 {
     Debug::Message('AddToArrayMethod');
     Debug::Value($method, $values);
     $method = new ReflectionMethod(get_class($object), 'add' . $method);
     foreach ($values as $value) {
         $method->invoke($object, $value);
     }
 }
Beispiel #2
0
 /**
  * @param string $name
  * @param string $basename
  * @param boolean $file
  */
 public function __construct($name, $basename, $file, $useOptions = false, $useInstall = false)
 {
     $this->name = $name;
     $this->file = $file;
     $this->useOptions = $useOptions;
     $this->useInstall = $useInstall;
     $this->basename = $basename;
     if ($this->useOptions) {
         $this->options = new Options($this->name);
     }
     Debug::Value($name, $this->name);
 }