Bravo3\Orm\Query\AbstractQuery::__construct PHP Метод

__construct() публичный Метод

public __construct ( string | object $class_name )
$class_name string | object Class name or entity
    public function __construct($class_name)
    {
        $this->setClassName($class_name);
    }

Usage Example

Пример #1
0
 /**
  * @param object    $entity            Entity to retrieve relationships from
  * @param string    $relationship_name Name of the relationship on provided entity
  * @param string    $sort_by           Sort by column
  * @param Direction $direction         Assumes ascending if omitted
  * @param int       $start             Start index (inclusive), null/0 for beginning of set
  * @param int       $end               Stop index (inclusive), null/-1 for end of set, -2 for penultimate record
  */
 public function __construct($entity, $relationship_name, $sort_by, Direction $direction = null, $start = null, $end = null)
 {
     parent::__construct($entity);
     $this->entity = $entity;
     $this->relationship_name = $relationship_name;
     $this->sort_by = $sort_by;
     $this->direction = $direction ?: Direction::ASC();
     $this->start = $start;
     $this->end = $end;
 }