1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-05 05:37:39 +02:00

removed NClass

This commit is contained in:
David Grudl
2007-12-11 07:28:55 +00:00
parent 2c8906e7c4
commit 041f059408
18 changed files with 109 additions and 139 deletions

View File

@@ -32,7 +32,6 @@ if (version_compare(PHP_VERSION , '5.1.0', '<')) {
// nette libraries // nette libraries
if (!class_exists('NObject', FALSE)) { require_once __FILE__ . '/../libs/NObject.php'; } if (!class_exists('NObject', FALSE)) { require_once __FILE__ . '/../libs/NObject.php'; }
if (!class_exists('NClass', FALSE)) { require_once __FILE__ . '/../libs/NClass.php'; }
if (!class_exists('NException', FALSE)) { require_once __FILE__ . '/../libs/NException.php'; } if (!class_exists('NException', FALSE)) { require_once __FILE__ . '/../libs/NException.php'; }
// dibi libraries // dibi libraries
@@ -60,7 +59,7 @@ require_once __FILE__ . '/../libs/DibiVariable.php';
* @package dibi * @package dibi
* @version $Revision$ $Date$ * @version $Revision$ $Date$
*/ */
class dibi extends NClass class dibi
{ {
/** /**
* Column type in relation to PHP native type * Column type in relation to PHP native type
@@ -142,6 +141,16 @@ class dibi extends NClass
/**
* static class
*/
final public function __construct()
{
throw new LogicException("Cannot instantiate static class " . get_class($this));
}
/** /**
* Creates a new DibiConnection object and connects it to specified database * Creates a new DibiConnection object and connects it to specified database
* *
@@ -245,7 +254,7 @@ class dibi extends NClass
/** /**
* Executes the SQL query - Monostate for DibiConnection::nativeQuery() * Executes the SQL query - Monostate for DibiConnection::nativeQuery()
* *
* @param string SQL statement. * @param string SQL statement.
* @return DibiResult Result set object (if any) * @return DibiResult Result set object (if any)
*/ */
public static function nativeQuery($sql) public static function nativeQuery($sql)
@@ -396,7 +405,7 @@ class dibi extends NClass
/** /**
* Pseudotype for timestamp representation * Pseudotype for timestamp representation
* *
* @param mixed datetime * @param mixed datetime
* @return DibiVariable * @return DibiVariable
*/ */
public static function datetime($time = NULL) public static function datetime($time = NULL)
@@ -416,7 +425,7 @@ class dibi extends NClass
/** /**
* Pseudotype for date representation * Pseudotype for date representation
* *
* @param mixed date * @param mixed date
* @return DibiVariable * @return DibiVariable
*/ */
public static function date($date = NULL) public static function date($date = NULL)
@@ -431,8 +440,8 @@ class dibi extends NClass
/** /**
* Create a new substitution pair for indentifiers * Create a new substitution pair for indentifiers
* *
* @param string from * @param string from
* @param string to * @param string to
* @return void * @return void
*/ */
public static function addSubst($expr, $subst) public static function addSubst($expr, $subst)
@@ -445,7 +454,7 @@ class dibi extends NClass
/** /**
* Remove substitution pair * Remove substitution pair
* *
* @param mixed from or TRUE * @param mixed from or TRUE
* @return void * @return void
*/ */
public static function removeSubst($expr) public static function removeSubst($expr)
@@ -474,7 +483,7 @@ class dibi extends NClass
/** /**
* Add new event handler * Add new event handler
* *
* @param callback * @param callback
* @return void * @return void
* @throws InvalidArgumentException * @throws InvalidArgumentException
*/ */
@@ -492,9 +501,9 @@ class dibi extends NClass
/** /**
* Event notification (events: exception, connected, beforeQuery, afterQuery, begin, commit, rollback) * Event notification (events: exception, connected, beforeQuery, afterQuery, begin, commit, rollback)
* *
* @param DibiConnection * @param DibiConnection
* @param string event name * @param string event name
* @param mixed * @param mixed
* @return void * @return void
*/ */
public static function notify(DibiConnection $connection = NULL, $event, $arg = NULL) public static function notify(DibiConnection $connection = NULL, $event, $arg = NULL)
@@ -509,8 +518,8 @@ class dibi extends NClass
/** /**
* Enable profiler & logger * Enable profiler & logger
* *
* @param string filename * @param string filename
* @param bool log all queries? * @param bool log all queries?
* @return DibiProfiler * @return DibiProfiler
*/ */
public static function startLogger($file, $logQueries = FALSE) public static function startLogger($file, $logQueries = FALSE)
@@ -526,8 +535,8 @@ class dibi extends NClass
/** /**
* Prints out a syntax highlighted version of the SQL command or DibiResult * Prints out a syntax highlighted version of the SQL command or DibiResult
* *
* @param string|DibiResult * @param string|DibiResult
* @param bool return or print? * @param bool return output instead of printing it?
* @return string * @return string
*/ */
public static function dump($sql = NULL, $return = FALSE) public static function dump($sql = NULL, $return = FALSE)

View File

@@ -108,7 +108,7 @@ class DibiMsSqlDriver extends NObject implements DibiDriverInterface
/** /**
* Executes the SQL query * Executes the SQL query
* *
* @param string SQL statement. * @param string SQL statement.
* @return bool have resultset? * @return bool have resultset?
* @throws DibiDriverException * @throws DibiDriverException
*/ */
@@ -188,8 +188,8 @@ class DibiMsSqlDriver extends NObject implements DibiDriverInterface
/** /**
* Format to SQL command * Format to SQL command
* *
* @param string value * @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER) * @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
* @return string formatted value * @return string formatted value
* @throws InvalidArgumentException * @throws InvalidArgumentException
*/ */
@@ -208,9 +208,9 @@ class DibiMsSqlDriver extends NObject implements DibiDriverInterface
/** /**
* Injects LIMIT/OFFSET to the SQL query * Injects LIMIT/OFFSET to the SQL query
* *
* @param string &$sql The SQL query that will be modified. * @param string &$sql The SQL query that will be modified.
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
* @return void * @return void
*/ */
public function applyLimit(&$sql, $limit, $offset) public function applyLimit(&$sql, $limit, $offset)

View File

@@ -157,7 +157,7 @@ class DibiMySqlDriver extends NObject implements DibiDriverInterface
/** /**
* Executes the SQL query * Executes the SQL query
* *
* @param string SQL statement. * @param string SQL statement.
* @return bool have resultset? * @return bool have resultset?
* @throws DibiDriverException * @throws DibiDriverException
*/ */
@@ -241,8 +241,8 @@ class DibiMySqlDriver extends NObject implements DibiDriverInterface
/** /**
* Format to SQL command * Format to SQL command
* *
* @param string value * @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER) * @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
* @return string formatted value * @return string formatted value
* @throws InvalidArgumentException * @throws InvalidArgumentException
*/ */
@@ -261,9 +261,9 @@ class DibiMySqlDriver extends NObject implements DibiDriverInterface
/** /**
* Injects LIMIT/OFFSET to the SQL query * Injects LIMIT/OFFSET to the SQL query
* *
* @param string &$sql The SQL query that will be modified. * @param string &$sql The SQL query that will be modified.
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
* @return void * @return void
*/ */
public function applyLimit(&$sql, $limit, $offset) public function applyLimit(&$sql, $limit, $offset)

View File

@@ -140,7 +140,7 @@ class DibiMySqliDriver extends NObject implements DibiDriverInterface
/** /**
* Executes the SQL query * Executes the SQL query
* *
* @param string SQL statement. * @param string SQL statement.
* @return bool have resultset? * @return bool have resultset?
* @throws DibiDriverException * @throws DibiDriverException
*/ */
@@ -220,8 +220,8 @@ class DibiMySqliDriver extends NObject implements DibiDriverInterface
/** /**
* Format to SQL command * Format to SQL command
* *
* @param string value * @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER) * @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
* @return string formatted value * @return string formatted value
* @throws InvalidArgumentException * @throws InvalidArgumentException
*/ */
@@ -240,9 +240,9 @@ class DibiMySqliDriver extends NObject implements DibiDriverInterface
/** /**
* Injects LIMIT/OFFSET to the SQL query * Injects LIMIT/OFFSET to the SQL query
* *
* @param string &$sql The SQL query that will be modified. * @param string &$sql The SQL query that will be modified.
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
* @return void * @return void
*/ */
public function applyLimit(&$sql, $limit, $offset) public function applyLimit(&$sql, $limit, $offset)

View File

@@ -114,7 +114,7 @@ class DibiOdbcDriver extends NObject implements DibiDriverInterface
/** /**
* Executes the SQL query * Executes the SQL query
* *
* @param string SQL statement. * @param string SQL statement.
* @return bool have resultset? * @return bool have resultset?
* @throws DibiDriverException * @throws DibiDriverException
*/ */
@@ -202,8 +202,8 @@ class DibiOdbcDriver extends NObject implements DibiDriverInterface
/** /**
* Format to SQL command * Format to SQL command
* *
* @param string value * @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER) * @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
* @return string formatted value * @return string formatted value
* @throws InvalidArgumentException * @throws InvalidArgumentException
*/ */
@@ -222,9 +222,9 @@ class DibiOdbcDriver extends NObject implements DibiDriverInterface
/** /**
* Injects LIMIT/OFFSET to the SQL query * Injects LIMIT/OFFSET to the SQL query
* *
* @param string &$sql The SQL query that will be modified. * @param string &$sql The SQL query that will be modified.
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
* @return void * @return void
*/ */
public function applyLimit(&$sql, $limit, $offset) public function applyLimit(&$sql, $limit, $offset)

View File

@@ -107,7 +107,7 @@ class DibiOracleDriver extends NObject implements DibiDriverInterface
/** /**
* Executes the SQL query * Executes the SQL query
* *
* @param string SQL statement. * @param string SQL statement.
* @return bool have resultset? * @return bool have resultset?
* @throws DibiDriverException * @throws DibiDriverException
*/ */
@@ -199,8 +199,8 @@ class DibiOracleDriver extends NObject implements DibiDriverInterface
/** /**
* Format to SQL command * Format to SQL command
* *
* @param string value * @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER) * @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
* @return string formatted value * @return string formatted value
* @throws InvalidArgumentException * @throws InvalidArgumentException
*/ */
@@ -219,9 +219,9 @@ class DibiOracleDriver extends NObject implements DibiDriverInterface
/** /**
* Injects LIMIT/OFFSET to the SQL query * Injects LIMIT/OFFSET to the SQL query
* *
* @param string &$sql The SQL query that will be modified. * @param string &$sql The SQL query that will be modified.
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
* @return void * @return void
*/ */
public function applyLimit(&$sql, $limit, $offset) public function applyLimit(&$sql, $limit, $offset)

View File

@@ -110,7 +110,7 @@ class DibiPdoDriver extends NObject implements DibiDriverInterface
/** /**
* Executes the SQL query * Executes the SQL query
* *
* @param string SQL statement. * @param string SQL statement.
* @return bool have resultset? * @return bool have resultset?
* @throws DibiDriverException * @throws DibiDriverException
*/ */
@@ -213,8 +213,8 @@ class DibiPdoDriver extends NObject implements DibiDriverInterface
/** /**
* Format to SQL command * Format to SQL command
* *
* @param string value * @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER) * @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
* @return string formatted value * @return string formatted value
* @throws InvalidArgumentException * @throws InvalidArgumentException
*/ */
@@ -233,9 +233,9 @@ class DibiPdoDriver extends NObject implements DibiDriverInterface
/** /**
* Injects LIMIT/OFFSET to the SQL query * Injects LIMIT/OFFSET to the SQL query
* *
* @param string &$sql The SQL query that will be modified. * @param string &$sql The SQL query that will be modified.
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
* @return void * @return void
*/ */
public function applyLimit(&$sql, $limit, $offset) public function applyLimit(&$sql, $limit, $offset)

View File

@@ -124,8 +124,8 @@ class DibiPostgreDriver extends NObject implements DibiDriverInterface
/** /**
* Executes the SQL query * Executes the SQL query
* *
* @param string SQL statement. * @param string SQL statement.
* @param bool update affected rows? * @param bool update affected rows?
* @return bool have resultset? * @return bool have resultset?
* @throws DibiDriverException * @throws DibiDriverException
*/ */
@@ -216,8 +216,8 @@ class DibiPostgreDriver extends NObject implements DibiDriverInterface
/** /**
* Format to SQL command * Format to SQL command
* *
* @param string value * @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER) * @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
* @return string formatted value * @return string formatted value
* @throws InvalidArgumentException * @throws InvalidArgumentException
*/ */
@@ -246,9 +246,9 @@ class DibiPostgreDriver extends NObject implements DibiDriverInterface
/** /**
* Injects LIMIT/OFFSET to the SQL query * Injects LIMIT/OFFSET to the SQL query
* *
* @param string &$sql The SQL query that will be modified. * @param string &$sql The SQL query that will be modified.
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
* @return void * @return void
*/ */
public function applyLimit(&$sql, $limit, $offset) public function applyLimit(&$sql, $limit, $offset)

View File

@@ -120,7 +120,7 @@ class DibiSqliteDriver extends NObject implements DibiDriverInterface
/** /**
* Executes the SQL query * Executes the SQL query
* *
* @param string SQL statement. * @param string SQL statement.
* @return bool have resultset? * @return bool have resultset?
* @throws DibiDriverException * @throws DibiDriverException
*/ */
@@ -202,8 +202,8 @@ class DibiSqliteDriver extends NObject implements DibiDriverInterface
/** /**
* Format to SQL command * Format to SQL command
* *
* @param string value * @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER) * @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
* @return string formatted value * @return string formatted value
* @throws InvalidArgumentException * @throws InvalidArgumentException
*/ */
@@ -222,9 +222,9 @@ class DibiSqliteDriver extends NObject implements DibiDriverInterface
/** /**
* Injects LIMIT/OFFSET to the SQL query * Injects LIMIT/OFFSET to the SQL query
* *
* @param string &$sql The SQL query that will be modified. * @param string &$sql The SQL query that will be modified.
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
* @return void * @return void
*/ */
public function applyLimit(&$sql, $limit, $offset) public function applyLimit(&$sql, $limit, $offset)

View File

@@ -144,8 +144,8 @@ class DibiConnection extends NObject
* Returns configuration variable. If no $key is passed, returns the entire array. * Returns configuration variable. If no $key is passed, returns the entire array.
* *
* @see self::__construct * @see self::__construct
* @param string * @param string
* @param mixed default value to use if key not found * @param mixed default value to use if key not found
* @return mixed * @return mixed
*/ */
final public function getConfig($key = NULL, $default = NULL) final public function getConfig($key = NULL, $default = NULL)
@@ -166,9 +166,9 @@ class DibiConnection extends NObject
/** /**
* Apply configuration alias or default values * Apply configuration alias or default values
* *
* @param array connect configuration * @param array connect configuration
* @param string key * @param string key
* @param string alias key * @param string alias key
* @return void * @return void
*/ */
public static function alias(&$config, $key, $alias=NULL) public static function alias(&$config, $key, $alias=NULL)
@@ -240,7 +240,7 @@ class DibiConnection extends NObject
/** /**
* Executes the SQL query * Executes the SQL query
* *
* @param string SQL statement. * @param string SQL statement.
* @return DibiResult Result set object (if any) * @return DibiResult Result set object (if any)
* @throws DibiException * @throws DibiException
*/ */
@@ -349,7 +349,7 @@ class DibiConnection extends NObject
/** /**
* Escapes the string * Escapes the string
* *
* @param string unescaped string * @param string unescaped string
* @return string escaped and optionally quoted string * @return string escaped and optionally quoted string
*/ */
public function escape($value) public function escape($value)
@@ -363,7 +363,7 @@ class DibiConnection extends NObject
/** /**
* Delimites identifier (table's or column's name, etc.) * Delimites identifier (table's or column's name, etc.)
* *
* @param string identifier * @param string identifier
* @return string delimited identifier * @return string delimited identifier
*/ */
public function delimite($value) public function delimite($value)
@@ -376,9 +376,9 @@ class DibiConnection extends NObject
/** /**
* Injects LIMIT/OFFSET to the SQL query * Injects LIMIT/OFFSET to the SQL query
* *
* @param string &$sql The SQL query that will be modified. * @param string &$sql The SQL query that will be modified.
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
* @return void * @return void
*/ */
public function applyLimit(&$sql, $limit, $offset) public function applyLimit(&$sql, $limit, $offset)

View File

@@ -54,7 +54,7 @@ interface DibiDriverInterface
/** /**
* Internal: Executes the SQL query * Internal: Executes the SQL query
* *
* @param string SQL statement. * @param string SQL statement.
* @return bool have resultset? * @return bool have resultset?
* @throws DibiDriverException * @throws DibiDriverException
*/ */
@@ -110,8 +110,8 @@ interface DibiDriverInterface
/** /**
* Format to SQL command * Format to SQL command
* *
* @param string value * @param string value
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER) * @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
* @return string formatted value * @return string formatted value
*/ */
function format($value, $type); function format($value, $type);
@@ -120,9 +120,9 @@ interface DibiDriverInterface
/** /**
* Injects LIMIT/OFFSET to the SQL query * Injects LIMIT/OFFSET to the SQL query
* *
* @param string &$sql The SQL query that will be modified. * @param string &$sql The SQL query that will be modified.
* @param int $limit * @param int $limit
* @param int $offset * @param int $offset
* @return void * @return void
*/ */
function applyLimit(&$sql, $limit, $offset); function applyLimit(&$sql, $limit, $offset);

View File

@@ -53,7 +53,7 @@ class DibiDriverException extends DibiException
* *
* @param string Message describing the exception * @param string Message describing the exception
* @param int Some code * @param int Some code
* @param string SQL command * @param string SQL command
*/ */
public function __construct($message = NULL, $code = 0, $sql = NULL) public function __construct($message = NULL, $code = 0, $sql = NULL)
{ {

View File

@@ -41,7 +41,7 @@ final class DibiLogger extends NObject
/** /**
* @param string filename * @param string filename
*/ */
public function __construct($file) public function __construct($file)
{ {
@@ -53,9 +53,9 @@ final class DibiLogger extends NObject
/** /**
* Event handler (events: exception, connected, beforeQuery, afterQuery, begin, commit, rollback) * Event handler (events: exception, connected, beforeQuery, afterQuery, begin, commit, rollback)
* *
* @param DibiConnection * @param DibiConnection
* @param string event name * @param string event name
* @param mixed * @param mixed
* @return void * @return void
*/ */
public function handler($connection, $event, $arg) public function handler($connection, $event, $arg)

View File

@@ -530,8 +530,8 @@ class DibiResult extends NObject implements IteratorAggregate, Countable
/** /**
* Required by the IteratorAggregate interface * Required by the IteratorAggregate interface
* @param int offset * @param int offset
* @param int limit * @param int limit
* @return ArrayIterator * @return ArrayIterator
*/ */
final public function getIterator($offset = NULL, $limit = NULL) final public function getIterator($offset = NULL, $limit = NULL)

View File

@@ -63,8 +63,8 @@ final class DibiResultIterator implements Iterator
/** /**
* Required by the Iterator interface * Required by the Iterator interface
* @param int offset * @param int offset
* @param int limit * @param int limit
*/ */
public function __construct(DibiResult $result, $offset, $limit) public function __construct(DibiResult $result, $offset, $limit)
{ {

View File

@@ -401,7 +401,7 @@ final class DibiTranslator extends NObject
/** /**
* Apply substitutions to indentifier and delimites it * Apply substitutions to indentifier and delimites it
* *
* @param string indentifier * @param string indentifier
* @return string * @return string
*/ */
private function delimite($value) private function delimite($value)

View File

@@ -1,39 +0,0 @@
<?php
/**
* dibi - tiny'n'smart database abstraction layer
* ----------------------------------------------
*
* Copyright (c) 2005, 2007 David Grudl aka -dgx- (http://www.dgx.cz)
*
* This source file is subject to the "dibi license" that is bundled
* with this package in the file license.txt.
*
* For more information please see http://dibiphp.com/
*
* @copyright Copyright (c) 2004, 2007 David Grudl
* @license http://nettephp.com/license Nette license
* @link http://nettephp.com/
* @package Nette
*/
/**
* NClass is the ultimate ancestor of all uninstantiable classes.
*
* @author David Grudl
* @copyright Copyright (c) 2004, 2007 David Grudl
* @license http://nettephp.com/license Nette license
* @link http://nettephp.com/
* @package Nette
*/
abstract class NClass
{
final public function __construct()
{
throw new LogicException("Cannot instantiate static class " . get_class($this));
}
}

View File

@@ -31,8 +31,8 @@
* methods as normal object variables. A property is defined by a getter method * methods as normal object variables. A property is defined by a getter method
* and optional setter method (no setter method means read-only property). * and optional setter method (no setter method means read-only property).
* <code> * <code>
* $val = $obj->Label; // equivalent to $val = $obj->getLabel(); * $val = $obj->label; // equivalent to $val = $obj->getLabel();
* $obj->Label = 'Nette'; // equivalent to $obj->setLabel('Nette'); * $obj->label = 'Nette'; // equivalent to $obj->setLabel('Nette');
* </code> * </code>
* Property names are case-sensitive, and they are written in the camelCaps * Property names are case-sensitive, and they are written in the camelCaps
* or PascalCaps. * or PascalCaps.
@@ -81,8 +81,8 @@ abstract class NObject
/** /**
* Call to undefined method * Call to undefined method
* *
* @param string method name * @param string method name
* @param array arguments * @param array arguments
* @return mixed * @return mixed
* @throws BadMethodCallException * @throws BadMethodCallException
*/ */
@@ -110,8 +110,8 @@ abstract class NObject
/** /**
* Returns property value. Do not call directly. * Returns property value. Do not call directly.
* *
* @param string property name * @param string property name
* @return mixed property value or the event handler list * @return mixed property value or the event handler list
* @throws LogicException if the property is not defined. * @throws LogicException if the property is not defined.
*/ */
protected function &__get($name) protected function &__get($name)
@@ -185,7 +185,7 @@ abstract class NObject
/** /**
* Access to undeclared property * Access to undeclared property
* *
* @param string property name * @param string property name
* @return void * @return void
* @throws LogicException * @throws LogicException
*/ */
@@ -201,7 +201,7 @@ abstract class NObject
* Has property accessor? * Has property accessor?
* *
* @param string class name * @param string class name
* @param string method name * @param string method name
* @return bool * @return bool
*/ */
private static function hasAccessor($c, $m) private static function hasAccessor($c, $m)