Example #1
0
 private function processHas($entityORM, $object)
 {
     $has = $entityORM->getHas();
     foreach ($has as $entityBox) {
         $className = ClassInfo::getClassName($entityBox->entity);
         $propertyMethod = 'get' . ucfirst($className);
         if ($entityBox->multiple === true) {
             $propertyMethod = $propertyMethod . 's';
             $propertyObjects = $object->{$propertyMethod}();
             foreach ($propertyObjects as $propertyObject) {
                 $this->processObject($propertyObject);
             }
         } else {
             $this->processObject($object->{$propertyMethod}());
         }
     }
 }
Example #2
0
 /**
  * @return string
  */
 public function getClassName($lower = false)
 {
     return $lower === false ? ClassInfo::getClassName($this->_entity) : ClassInfo::getLowerClassName($this->_entity);
 }
Example #3
0
 /**
  * @param string $fqcn
  * @param string $operator Where_Query OPERATOR_* constant
  * @param mixed $value
  * @param string $seperator Where_Query WHERE_* constant
  */
 public function filterByEntity($fqcn, $operator, $value, $seperator = false)
 {
     $this->_useEntities[$fqcn] = true;
     $this->filter(ClassInfo::getLowerClassName($fqcn), $operator, $value, $seperator);
 }