Example #1
0
 function testGetPropertyWeirdNotation2()
 {
     $name = Reflection::getProperty("getname");
     $this->assertEquals("name", $name);
 }
Example #2
0
 /**
  * Find properties based on a method name.
  *
  * This overrides graph elements findProperty, in order to allow for finding the start/end properties.
  *
  * @param string $name Method name.
  * @return Property|null Property if found, otherwise null.
  */
 function findProperty($name)
 {
     //Get the property from the method name
     $property = Reflection::getProperty($name);
     if ($this->start->matches($property)) {
         return $this->start;
     }
     if ($this->end->matches($property)) {
         return $this->end;
     }
     return parent::findProperty($name);
 }
Example #3
0
 /**
  * Finds property by method name.
  *
  * @param string $name
  * @return \LRezek\Arachnid\Meta\Property|null The property, or null if it's not found.
  */
 function findProperty($name)
 {
     //Get rid of get/set and get the singularized prop name
     $property = Reflection::getProperty($name);
     foreach ($this->properties as $p) {
         if ($p->matches($property)) {
             return $p;
         }
     }
     return null;
 }