1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-16 19:14:17 +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

@@ -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)

View File

@@ -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);

View File

@@ -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)
{

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)
{

View File

@@ -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)

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
* 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)