Class ContactRepository
Nette\Object is the ultimate ancestor of all instantiable classes.
It defines some handful methods and enhances object core of PHP: - access to undeclared members throws exceptions - support for conventional properties with getters and setters - support for event raising functionality - ability to add new methods to class (extension methods)
Properties is a syntactic sugar which allows access public getter and setter methods as normal object variables. A property is defined by a getter method or setter method (no setter method means read-only property).
$val = $obj->label; // equivalent to $val = $obj->getLabel(); $obj->label = 'Nette'; // equivalent to $obj->setLabel('Nette');
Property names are case-sensitive, and they are written in the camelCaps or PascalCaps.
Event functionality is provided by declaration of property named 'on{Something}' Multiple handlers are allowed.
public $onClick; // declaration in class $this->onClick[] = 'callback'; // attaching event handler if (!empty($this->onClick)) ... // are there any handlers? $this->onClick($sender, $arg); // raises the event with arguments
Adding method to class (i.e. to all instances) works similar to JavaScript prototype property. The syntax for adding a new method is:
MyClass::extensionMethod('newMethod', function(MyClass $obj, $arg, ...) { ... }); $obj = new MyClass; $obj->newMethod($x);
- Nette\Object
-
Budovy\Repository
-
Budovy\ContactRepository
public
array
|
|
public
|
#
getGridSelection( array $filter, array $order, integer $page, integer $limit )
Vrati selection pro datagrid |
public
integer
|
__construct(),
deleteById(),
findBy(),
findById(),
getTable(),
insertData(),
updateById()
|
__call(),
__callStatic(),
__get(),
__isset(),
__set(),
__unset(),
extensionMethod(),
getReflection()
|
$connection,
$table
|
$reflection
|