Ejemplo n.º 1
0
 /**
  * Add the class's properties to the manifest
  */
 private function finaliseProperties()
 {
     $ref = new \ReflectionClass($this->class);
     foreach ($ref->getProperties() as $propertyReflector) {
         $needExportComment = !$this->exportAll && !$this->manifest->exportAll();
         $property = new Property($propertyReflector);
         if ($needExportComment && !$property->export) {
             continue;
         }
         $this->properties[$property->name] = $property;
         if ($property->isIdentifier) {
             $this->identifiers[] = $property->name;
         }
     }
 }
Ejemplo n.º 2
0
 /**
  * Set the exportAll property
  * 
  * @param string $exportAll
  *   If equal to the string 'This is dangerous', enables this option.
  * 
  * @return self
  */
 public function exportAllMethods($warning)
 {
     $this->manifest->exportAll($warning == 'This is dangerous');
     return $this;
 }