mirror of
https://github.com/dg/dibi.git
synced 2025-08-04 21:28:02 +02:00
removed NClass
This commit is contained in:
@@ -32,7 +32,6 @@ if (version_compare(PHP_VERSION , '5.1.0', '<')) {
|
||||
|
||||
// nette libraries
|
||||
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'; }
|
||||
|
||||
// dibi libraries
|
||||
@@ -60,7 +59,7 @@ require_once __FILE__ . '/../libs/DibiVariable.php';
|
||||
* @package dibi
|
||||
* @version $Revision$ $Date$
|
||||
*/
|
||||
class dibi extends NClass
|
||||
class dibi
|
||||
{
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
@@ -245,7 +254,7 @@ class dibi extends NClass
|
||||
/**
|
||||
* Executes the SQL query - Monostate for DibiConnection::nativeQuery()
|
||||
*
|
||||
* @param string SQL statement.
|
||||
* @param string SQL statement.
|
||||
* @return DibiResult Result set object (if any)
|
||||
*/
|
||||
public static function nativeQuery($sql)
|
||||
@@ -396,7 +405,7 @@ class dibi extends NClass
|
||||
/**
|
||||
* Pseudotype for timestamp representation
|
||||
*
|
||||
* @param mixed datetime
|
||||
* @param mixed datetime
|
||||
* @return DibiVariable
|
||||
*/
|
||||
public static function datetime($time = NULL)
|
||||
@@ -416,7 +425,7 @@ class dibi extends NClass
|
||||
/**
|
||||
* Pseudotype for date representation
|
||||
*
|
||||
* @param mixed date
|
||||
* @param mixed date
|
||||
* @return DibiVariable
|
||||
*/
|
||||
public static function date($date = NULL)
|
||||
@@ -431,8 +440,8 @@ class dibi extends NClass
|
||||
/**
|
||||
* Create a new substitution pair for indentifiers
|
||||
*
|
||||
* @param string from
|
||||
* @param string to
|
||||
* @param string from
|
||||
* @param string to
|
||||
* @return void
|
||||
*/
|
||||
public static function addSubst($expr, $subst)
|
||||
@@ -445,7 +454,7 @@ class dibi extends NClass
|
||||
/**
|
||||
* Remove substitution pair
|
||||
*
|
||||
* @param mixed from or TRUE
|
||||
* @param mixed from or TRUE
|
||||
* @return void
|
||||
*/
|
||||
public static function removeSubst($expr)
|
||||
@@ -474,7 +483,7 @@ class dibi extends NClass
|
||||
/**
|
||||
* Add new event handler
|
||||
*
|
||||
* @param callback
|
||||
* @param callback
|
||||
* @return void
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
@@ -492,9 +501,9 @@ class dibi extends NClass
|
||||
/**
|
||||
* Event notification (events: exception, connected, beforeQuery, afterQuery, begin, commit, rollback)
|
||||
*
|
||||
* @param DibiConnection
|
||||
* @param string event name
|
||||
* @param mixed
|
||||
* @param DibiConnection
|
||||
* @param string event name
|
||||
* @param mixed
|
||||
* @return void
|
||||
*/
|
||||
public static function notify(DibiConnection $connection = NULL, $event, $arg = NULL)
|
||||
@@ -509,8 +518,8 @@ class dibi extends NClass
|
||||
/**
|
||||
* Enable profiler & logger
|
||||
*
|
||||
* @param string filename
|
||||
* @param bool log all queries?
|
||||
* @param string filename
|
||||
* @param bool log all queries?
|
||||
* @return DibiProfiler
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @param string|DibiResult
|
||||
* @param bool return or print?
|
||||
* @param string|DibiResult
|
||||
* @param bool return output instead of printing it?
|
||||
* @return string
|
||||
*/
|
||||
public static function dump($sql = NULL, $return = FALSE)
|
||||
|
@@ -108,7 +108,7 @@ class DibiMsSqlDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Executes the SQL query
|
||||
*
|
||||
* @param string SQL statement.
|
||||
* @param string SQL statement.
|
||||
* @return bool have resultset?
|
||||
* @throws DibiDriverException
|
||||
*/
|
||||
@@ -188,8 +188,8 @@ class DibiMsSqlDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Format to SQL command
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
|
||||
* @return string formatted value
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
@@ -208,9 +208,9 @@ class DibiMsSqlDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Injects LIMIT/OFFSET to the SQL query
|
||||
*
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @return void
|
||||
*/
|
||||
public function applyLimit(&$sql, $limit, $offset)
|
||||
|
@@ -157,7 +157,7 @@ class DibiMySqlDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Executes the SQL query
|
||||
*
|
||||
* @param string SQL statement.
|
||||
* @param string SQL statement.
|
||||
* @return bool have resultset?
|
||||
* @throws DibiDriverException
|
||||
*/
|
||||
@@ -241,8 +241,8 @@ class DibiMySqlDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Format to SQL command
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
|
||||
* @return string formatted value
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
@@ -261,9 +261,9 @@ class DibiMySqlDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Injects LIMIT/OFFSET to the SQL query
|
||||
*
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @return void
|
||||
*/
|
||||
public function applyLimit(&$sql, $limit, $offset)
|
||||
|
@@ -140,7 +140,7 @@ class DibiMySqliDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Executes the SQL query
|
||||
*
|
||||
* @param string SQL statement.
|
||||
* @param string SQL statement.
|
||||
* @return bool have resultset?
|
||||
* @throws DibiDriverException
|
||||
*/
|
||||
@@ -220,8 +220,8 @@ class DibiMySqliDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Format to SQL command
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
|
||||
* @return string formatted value
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
@@ -240,9 +240,9 @@ class DibiMySqliDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Injects LIMIT/OFFSET to the SQL query
|
||||
*
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @return void
|
||||
*/
|
||||
public function applyLimit(&$sql, $limit, $offset)
|
||||
|
@@ -114,7 +114,7 @@ class DibiOdbcDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Executes the SQL query
|
||||
*
|
||||
* @param string SQL statement.
|
||||
* @param string SQL statement.
|
||||
* @return bool have resultset?
|
||||
* @throws DibiDriverException
|
||||
*/
|
||||
@@ -202,8 +202,8 @@ class DibiOdbcDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Format to SQL command
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
|
||||
* @return string formatted value
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
@@ -222,9 +222,9 @@ class DibiOdbcDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Injects LIMIT/OFFSET to the SQL query
|
||||
*
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @return void
|
||||
*/
|
||||
public function applyLimit(&$sql, $limit, $offset)
|
||||
|
@@ -107,7 +107,7 @@ class DibiOracleDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Executes the SQL query
|
||||
*
|
||||
* @param string SQL statement.
|
||||
* @param string SQL statement.
|
||||
* @return bool have resultset?
|
||||
* @throws DibiDriverException
|
||||
*/
|
||||
@@ -199,8 +199,8 @@ class DibiOracleDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Format to SQL command
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
|
||||
* @return string formatted value
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
@@ -219,9 +219,9 @@ class DibiOracleDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Injects LIMIT/OFFSET to the SQL query
|
||||
*
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @return void
|
||||
*/
|
||||
public function applyLimit(&$sql, $limit, $offset)
|
||||
|
@@ -110,7 +110,7 @@ class DibiPdoDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Executes the SQL query
|
||||
*
|
||||
* @param string SQL statement.
|
||||
* @param string SQL statement.
|
||||
* @return bool have resultset?
|
||||
* @throws DibiDriverException
|
||||
*/
|
||||
@@ -213,8 +213,8 @@ class DibiPdoDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Format to SQL command
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
|
||||
* @return string formatted value
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
@@ -233,9 +233,9 @@ class DibiPdoDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Injects LIMIT/OFFSET to the SQL query
|
||||
*
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @return void
|
||||
*/
|
||||
public function applyLimit(&$sql, $limit, $offset)
|
||||
|
@@ -124,8 +124,8 @@ class DibiPostgreDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Executes the SQL query
|
||||
*
|
||||
* @param string SQL statement.
|
||||
* @param bool update affected rows?
|
||||
* @param string SQL statement.
|
||||
* @param bool update affected rows?
|
||||
* @return bool have resultset?
|
||||
* @throws DibiDriverException
|
||||
*/
|
||||
@@ -216,8 +216,8 @@ class DibiPostgreDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Format to SQL command
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
|
||||
* @return string formatted value
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
@@ -246,9 +246,9 @@ class DibiPostgreDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Injects LIMIT/OFFSET to the SQL query
|
||||
*
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @return void
|
||||
*/
|
||||
public function applyLimit(&$sql, $limit, $offset)
|
||||
|
@@ -120,7 +120,7 @@ class DibiSqliteDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Executes the SQL query
|
||||
*
|
||||
* @param string SQL statement.
|
||||
* @param string SQL statement.
|
||||
* @return bool have resultset?
|
||||
* @throws DibiDriverException
|
||||
*/
|
||||
@@ -202,8 +202,8 @@ class DibiSqliteDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Format to SQL command
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
|
||||
* @return string formatted value
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
@@ -222,9 +222,9 @@ class DibiSqliteDriver extends NObject implements DibiDriverInterface
|
||||
/**
|
||||
* Injects LIMIT/OFFSET to the SQL query
|
||||
*
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @return void
|
||||
*/
|
||||
public function applyLimit(&$sql, $limit, $offset)
|
||||
|
@@ -144,8 +144,8 @@ class DibiConnection extends NObject
|
||||
* Returns configuration variable. If no $key is passed, returns the entire array.
|
||||
*
|
||||
* @see self::__construct
|
||||
* @param string
|
||||
* @param mixed default value to use if key not found
|
||||
* @param string
|
||||
* @param mixed default value to use if key not found
|
||||
* @return mixed
|
||||
*/
|
||||
final public function getConfig($key = NULL, $default = NULL)
|
||||
@@ -166,9 +166,9 @@ class DibiConnection extends NObject
|
||||
/**
|
||||
* Apply configuration alias or default values
|
||||
*
|
||||
* @param array connect configuration
|
||||
* @param string key
|
||||
* @param string alias key
|
||||
* @param array connect configuration
|
||||
* @param string key
|
||||
* @param string alias key
|
||||
* @return void
|
||||
*/
|
||||
public static function alias(&$config, $key, $alias=NULL)
|
||||
@@ -240,7 +240,7 @@ class DibiConnection extends NObject
|
||||
/**
|
||||
* Executes the SQL query
|
||||
*
|
||||
* @param string SQL statement.
|
||||
* @param string SQL statement.
|
||||
* @return DibiResult Result set object (if any)
|
||||
* @throws DibiException
|
||||
*/
|
||||
@@ -349,7 +349,7 @@ class DibiConnection extends NObject
|
||||
/**
|
||||
* Escapes the string
|
||||
*
|
||||
* @param string unescaped string
|
||||
* @param string unescaped string
|
||||
* @return string escaped and optionally quoted string
|
||||
*/
|
||||
public function escape($value)
|
||||
@@ -363,7 +363,7 @@ class DibiConnection extends NObject
|
||||
/**
|
||||
* Delimites identifier (table's or column's name, etc.)
|
||||
*
|
||||
* @param string identifier
|
||||
* @param string identifier
|
||||
* @return string delimited identifier
|
||||
*/
|
||||
public function delimite($value)
|
||||
@@ -376,9 +376,9 @@ class DibiConnection extends NObject
|
||||
/**
|
||||
* Injects LIMIT/OFFSET to the SQL query
|
||||
*
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @return void
|
||||
*/
|
||||
public function applyLimit(&$sql, $limit, $offset)
|
||||
|
@@ -54,7 +54,7 @@ interface DibiDriverInterface
|
||||
/**
|
||||
* Internal: Executes the SQL query
|
||||
*
|
||||
* @param string SQL statement.
|
||||
* @param string SQL statement.
|
||||
* @return bool have resultset?
|
||||
* @throws DibiDriverException
|
||||
*/
|
||||
@@ -110,8 +110,8 @@ interface DibiDriverInterface
|
||||
/**
|
||||
* Format to SQL command
|
||||
*
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
|
||||
* @param string value
|
||||
* @param string type (dibi::FIELD_TEXT, dibi::FIELD_BOOL, dibi::FIELD_DATE, dibi::FIELD_DATETIME, dibi::IDENTIFIER)
|
||||
* @return string formatted value
|
||||
*/
|
||||
function format($value, $type);
|
||||
@@ -120,9 +120,9 @@ interface DibiDriverInterface
|
||||
/**
|
||||
* Injects LIMIT/OFFSET to the SQL query
|
||||
*
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @param string &$sql The SQL query that will be modified.
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @return void
|
||||
*/
|
||||
function applyLimit(&$sql, $limit, $offset);
|
||||
|
@@ -53,7 +53,7 @@ class DibiDriverException extends DibiException
|
||||
*
|
||||
* @param string Message describing the exception
|
||||
* @param int Some code
|
||||
* @param string SQL command
|
||||
* @param string SQL command
|
||||
*/
|
||||
public function __construct($message = NULL, $code = 0, $sql = NULL)
|
||||
{
|
||||
|
@@ -41,7 +41,7 @@ final class DibiLogger extends NObject
|
||||
|
||||
|
||||
/**
|
||||
* @param string filename
|
||||
* @param string filename
|
||||
*/
|
||||
public function __construct($file)
|
||||
{
|
||||
@@ -53,9 +53,9 @@ final class DibiLogger extends NObject
|
||||
/**
|
||||
* Event handler (events: exception, connected, beforeQuery, afterQuery, begin, commit, rollback)
|
||||
*
|
||||
* @param DibiConnection
|
||||
* @param string event name
|
||||
* @param mixed
|
||||
* @param DibiConnection
|
||||
* @param string event name
|
||||
* @param mixed
|
||||
* @return void
|
||||
*/
|
||||
public function handler($connection, $event, $arg)
|
||||
|
@@ -530,8 +530,8 @@ class DibiResult extends NObject implements IteratorAggregate, Countable
|
||||
|
||||
/**
|
||||
* Required by the IteratorAggregate interface
|
||||
* @param int offset
|
||||
* @param int limit
|
||||
* @param int offset
|
||||
* @param int limit
|
||||
* @return ArrayIterator
|
||||
*/
|
||||
final public function getIterator($offset = NULL, $limit = NULL)
|
||||
|
@@ -63,8 +63,8 @@ final class DibiResultIterator implements Iterator
|
||||
|
||||
/**
|
||||
* Required by the Iterator interface
|
||||
* @param int offset
|
||||
* @param int limit
|
||||
* @param int offset
|
||||
* @param int limit
|
||||
*/
|
||||
public function __construct(DibiResult $result, $offset, $limit)
|
||||
{
|
||||
|
@@ -401,7 +401,7 @@ final class DibiTranslator extends NObject
|
||||
/**
|
||||
* Apply substitutions to indentifier and delimites it
|
||||
*
|
||||
* @param string indentifier
|
||||
* @param string indentifier
|
||||
* @return string
|
||||
*/
|
||||
private function delimite($value)
|
||||
|
@@ -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));
|
||||
}
|
||||
|
||||
}
|
@@ -31,8 +31,8 @@
|
||||
* methods as normal object variables. A property is defined by a getter method
|
||||
* and optional setter method (no setter method means read-only property).
|
||||
* <code>
|
||||
* $val = $obj->Label; // equivalent to $val = $obj->getLabel();
|
||||
* $obj->Label = 'Nette'; // equivalent to $obj->setLabel('Nette');
|
||||
* $val = $obj->label; // equivalent to $val = $obj->getLabel();
|
||||
* $obj->label = 'Nette'; // equivalent to $obj->setLabel('Nette');
|
||||
* </code>
|
||||
* Property names are case-sensitive, and they are written in the camelCaps
|
||||
* or PascalCaps.
|
||||
@@ -81,8 +81,8 @@ abstract class NObject
|
||||
/**
|
||||
* Call to undefined method
|
||||
*
|
||||
* @param string method name
|
||||
* @param array arguments
|
||||
* @param string method name
|
||||
* @param array arguments
|
||||
* @return mixed
|
||||
* @throws BadMethodCallException
|
||||
*/
|
||||
@@ -110,8 +110,8 @@ abstract class NObject
|
||||
/**
|
||||
* Returns property value. Do not call directly.
|
||||
*
|
||||
* @param string property name
|
||||
* @return mixed property value or the event handler list
|
||||
* @param string property name
|
||||
* @return mixed property value or the event handler list
|
||||
* @throws LogicException if the property is not defined.
|
||||
*/
|
||||
protected function &__get($name)
|
||||
@@ -185,7 +185,7 @@ abstract class NObject
|
||||
/**
|
||||
* Access to undeclared property
|
||||
*
|
||||
* @param string property name
|
||||
* @param string property name
|
||||
* @return void
|
||||
* @throws LogicException
|
||||
*/
|
||||
@@ -201,7 +201,7 @@ abstract class NObject
|
||||
* Has property accessor?
|
||||
*
|
||||
* @param string class name
|
||||
* @param string method name
|
||||
* @param string method name
|
||||
* @return bool
|
||||
*/
|
||||
private static function hasAccessor($c, $m)
|
||||
|
Reference in New Issue
Block a user