コード例 #1
0
 /**
  * Levert een array met variabelen van deze class op
  *
  * @param boolean If the method should also return protected properties
  * @param boolean If the method should also return private properties
  * @return IPReflectionProperty[]
  */
 public function getProperties($alsoProtected = true, $alsoPrivate = true)
 {
     $ar = parent::getProperties();
     $this->properties = array();
     foreach ($ar as $property) {
         if ((!$property->isPrivate() || $alsoPrivate) && (!$property->isProtected() || $alsoProtected)) {
             try {
                 $p = new IPReflectionProperty($this->classname, $property->getName());
                 $this->properties[$property->name] = $p;
             } catch (ReflectionException $exception) {
                 echo "Fout bij property: " . $property->name . "<br>\n";
             }
         }
     }
     ksort($this->properties);
     return $this->properties;
 }