コード例 #1
0
ファイル: Repository.php プロジェクト: nvdnkpr/Neo4j-PHP-OGM
 private function getSearchableProperty($property)
 {
     $property = Reflection::cleanProperty($property);
     foreach ($this->meta->getIndexedProperties() as $p) {
         if (Reflection::cleanProperty($p->getName()) == $property) {
             return $property;
         }
     }
     throw new Exception("Property {$property} is not indexed.");
 }
コード例 #2
0
 function testDoubleS()
 {
     $this->assertEquals('access', Reflection::cleanProperty('access'));
 }
コード例 #3
0
ファイル: EntityMeta.php プロジェクト: nvdnkpr/Neo4j-PHP-OGM
 function findProperty($name)
 {
     $property = Reflection::getProperty($name);
     foreach ($this->properties as $p) {
         if ($p->matches(substr($name, 3), $property)) {
             return $p;
         }
     }
     foreach ($this->manyToManyRelations as $p) {
         if ($p->matches(substr($name, 3), $property)) {
             return $p;
         }
     }
     foreach ($this->manyToOneRelations as $p) {
         if ($p->matches(substr($name, 3), $property)) {
             return $p;
         }
     }
 }