From 65144f2b0fad32b182ccb062b1efc1b4edea5d44 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 9 Dec 2018 16:10:50 +0200 Subject: [PATCH] Updated stubs regarding to the 3.4.2 version --- src/Phalcon/Crypt.php | 4 +-- src/Phalcon/CryptInterface.php | 2 +- src/Phalcon/Di.php | 10 +++--- src/Phalcon/DiInterface.php | 2 +- src/Phalcon/FactoryInterface.php | 2 +- src/Phalcon/Filter.php | 2 +- src/Phalcon/FlashInterface.php | 2 +- src/Phalcon/Loader.php | 2 +- src/Phalcon/Registry.php | 8 ++--- src/Phalcon/Validation.php | 2 +- src/Phalcon/acl/Adapter.php | 12 +++---- src/Phalcon/acl/AdapterInterface.php | 2 +- src/Phalcon/assets/Inline.php | 32 +++++++++++------ src/Phalcon/assets/Resource.php | 10 +++--- src/Phalcon/cache/BackendInterface.php | 4 +-- src/Phalcon/db/Adapter.php | 8 ++--- src/Phalcon/db/AdapterInterface.php | 4 +-- src/Phalcon/db/Column.php | 2 +- src/Phalcon/db/Dialect.php | 13 ------- src/Phalcon/db/DialectInterface.php | 1 - src/Phalcon/db/Index.php | 2 +- src/Phalcon/db/Reference.php | 2 +- src/Phalcon/db/ResultInterface.php | 4 ++- src/Phalcon/db/adapter/pdo/Mysql.php | 4 +-- src/Phalcon/db/adapter/pdo/Postgresql.php | 2 +- src/Phalcon/db/adapter/pdo/Sqlite.php | 6 ++-- src/Phalcon/db/dialect/Mysql.php | 13 +++++++ src/Phalcon/db/dialect/Postgresql.php | 9 +++++ src/Phalcon/db/dialect/Sqlite.php | 9 +++++ src/Phalcon/di/InjectionAwareInterface.php | 2 +- src/Phalcon/di/Service.php | 4 +-- src/Phalcon/forms/Element.php | 2 +- src/Phalcon/http/Request.php | 4 +-- src/Phalcon/http/RequestInterface.php | 4 +-- src/Phalcon/http/Response.php | 34 +++++++++---------- src/Phalcon/http/response/Cookies.php | 8 ++--- .../http/response/CookiesInterface.php | 2 +- src/Phalcon/http/response/Headers.php | 2 +- src/Phalcon/logger/adapter/Syslog.php | 2 +- src/Phalcon/mvc/Collection.php | 4 +-- src/Phalcon/mvc/CollectionInterface.php | 2 +- src/Phalcon/mvc/Model.php | 4 +-- src/Phalcon/mvc/Router.php | 22 ++++++++++++ src/Phalcon/mvc/RouterInterface.php | 4 +-- src/Phalcon/mvc/UrlInterface.php | 3 +- src/Phalcon/mvc/ViewBaseInterface.php | 3 +- src/Phalcon/mvc/ViewInterface.php | 4 +-- src/Phalcon/mvc/collection/Document.php | 4 +-- src/Phalcon/mvc/micro/Collection.php | 4 +-- src/Phalcon/mvc/model/BinderInterface.php | 2 +- src/Phalcon/mvc/model/Criteria.php | 30 ++++++++-------- src/Phalcon/mvc/model/CriteriaInterface.php | 7 ++-- src/Phalcon/mvc/model/ManagerInterface.php | 21 ++++++------ src/Phalcon/mvc/model/Message.php | 34 +++++++++---------- src/Phalcon/mvc/model/ResultInterface.php | 2 +- src/Phalcon/mvc/model/Resultset.php | 8 ++--- .../mvc/model/TransactionInterface.php | 2 +- src/Phalcon/mvc/model/metadata/Files.php | 2 +- src/Phalcon/mvc/model/query/Builder.php | 4 +-- src/Phalcon/mvc/model/resultset/Complex.php | 2 +- src/Phalcon/mvc/model/resultset/Simple.php | 2 +- src/Phalcon/mvc/router/Route.php | 31 +++++++++++++++-- src/Phalcon/mvc/view/EngineInterface.php | 2 +- src/Phalcon/mvc/view/engine/volt/Compiler.php | 2 +- src/Phalcon/paginator/Adapter.php | 14 ++++---- src/Phalcon/paginator/AdapterInterface.php | 1 + src/Phalcon/paginator/adapter/Model.php | 8 +++++ src/Phalcon/paginator/adapter/NativeArray.php | 8 +++++ .../paginator/adapter/QueryBuilder.php | 8 +++++ src/Phalcon/session/Adapter.php | 6 ++-- src/Phalcon/session/AdapterInterface.php | 4 +-- src/Phalcon/session/Bag.php | 8 ++--- src/Phalcon/session/adapter/Libmemcached.php | 2 +- src/Phalcon/session/adapter/Memcache.php | 2 +- src/Phalcon/session/adapter/Redis.php | 2 +- src/Phalcon/translate/Adapter.php | 2 +- src/Phalcon/validation/Message.php | 2 +- 77 files changed, 310 insertions(+), 201 deletions(-) diff --git a/src/Phalcon/Crypt.php b/src/Phalcon/Crypt.php index f81bac61..722ef5af 100644 --- a/src/Phalcon/Crypt.php +++ b/src/Phalcon/Crypt.php @@ -110,7 +110,7 @@ public function setPadding($scheme) {} * algorithm for current openssl library version. * * @param string $cipher - * @return Crypt + * @return \Phalcon\CryptInterface */ public function setCipher($cipher) {} @@ -137,7 +137,7 @@ public function getCipher() {} * * @see \Phalcon\Security\Random * @param string $key - * @return Crypt + * @return \Phalcon\CryptInterface */ public function setKey($key) {} diff --git a/src/Phalcon/CryptInterface.php b/src/Phalcon/CryptInterface.php index 7e92972d..d79c16f8 100644 --- a/src/Phalcon/CryptInterface.php +++ b/src/Phalcon/CryptInterface.php @@ -44,7 +44,7 @@ public function getKey(); * Encrypts a text * * @param string $text - * @param mixed $key + * @param string $key * @return string */ public function encrypt($text, $key = null); diff --git a/src/Phalcon/Di.php b/src/Phalcon/Di.php index fdefa301..1ebe86df 100644 --- a/src/Phalcon/Di.php +++ b/src/Phalcon/Di.php @@ -196,7 +196,7 @@ public function getServices() {} /** * Check if a service is registered using the array syntax * - * @param string $name + * @param mixed $name * @return bool */ public function offsetExists($name) {} @@ -208,7 +208,7 @@ public function offsetExists($name) {} * $di["request"] = new \Phalcon\Http\Request(); * * - * @param string $name + * @param mixed $name * @param mixed $definition * @return bool */ @@ -221,7 +221,7 @@ public function offsetSet($name, $definition) {} * var_dump($di["request"]); * * - * @param string $name + * @param mixed $name * @return mixed */ public function offsetGet($name) {} @@ -229,7 +229,7 @@ public function offsetGet($name) {} /** * Removes a service from the services container using the array syntax * - * @param string $name + * @param mixed $name * @return bool */ public function offsetUnset($name) {} @@ -275,7 +275,7 @@ public static function setDefault(\Phalcon\DiInterface $dependencyInjector) {} /** * Return the latest DI created * - * @return \Phalcon\DiInterface + * @return null|\Phalcon\DiInterface */ public static function getDefault() {} diff --git a/src/Phalcon/DiInterface.php b/src/Phalcon/DiInterface.php index c04a3ebc..a250d834 100644 --- a/src/Phalcon/DiInterface.php +++ b/src/Phalcon/DiInterface.php @@ -44,7 +44,7 @@ public function remove($name); * @param string $name * @param mixed $definition * @param boolean $shared - * @return \Phalcon\Di\ServiceInterface + * @return bool|\Phalcon\Di\ServiceInterface */ public function attempt($name, $definition, $shared = false); diff --git a/src/Phalcon/FactoryInterface.php b/src/Phalcon/FactoryInterface.php index 090638a8..50822c19 100644 --- a/src/Phalcon/FactoryInterface.php +++ b/src/Phalcon/FactoryInterface.php @@ -8,7 +8,7 @@ interface FactoryInterface /** * @param \Phalcon\Config|array $config - * @return object + * @return mixed */ public static function load($config); diff --git a/src/Phalcon/Filter.php b/src/Phalcon/Filter.php index 3ec35ea1..7faa85f9 100644 --- a/src/Phalcon/Filter.php +++ b/src/Phalcon/Filter.php @@ -71,7 +71,7 @@ class Filter implements \Phalcon\FilterInterface * * @param string $name * @param mixed $handler - * @return Filter + * @return \Phalcon\FilterInterface */ public function add($name, $handler) {} diff --git a/src/Phalcon/FlashInterface.php b/src/Phalcon/FlashInterface.php index 7053c80a..9353fd25 100644 --- a/src/Phalcon/FlashInterface.php +++ b/src/Phalcon/FlashInterface.php @@ -42,7 +42,7 @@ public function warning($message); * Outputs a message * * @param string $type - * @param mixed $message + * @param string $message */ public function message($type, $message); diff --git a/src/Phalcon/Loader.php b/src/Phalcon/Loader.php index e4f19851..df4db6d0 100644 --- a/src/Phalcon/Loader.php +++ b/src/Phalcon/Loader.php @@ -188,7 +188,7 @@ public function getClasses() {} * @param bool $prepend * @return Loader */ - public function register($prepend = null) {} + public function register($prepend = false) {} /** * Unregister the autoload method diff --git a/src/Phalcon/Registry.php b/src/Phalcon/Registry.php index 7ee3d07c..5f4d660d 100644 --- a/src/Phalcon/Registry.php +++ b/src/Phalcon/Registry.php @@ -66,7 +66,7 @@ public final function __construct() {} /** * Checks if the element is present in the registry * - * @param string $offset + * @param mixed $offset * @return bool */ public final function offsetExists($offset) {} @@ -74,7 +74,7 @@ public final function offsetExists($offset) {} /** * Returns an index in the registry * - * @param string $offset + * @param mixed $offset * @return mixed */ public final function offsetGet($offset) {} @@ -82,7 +82,7 @@ public final function offsetGet($offset) {} /** * Sets an element in the registry * - * @param string $offset + * @param mixed $offset * @param mixed $value */ public final function offsetSet($offset, $value) {} @@ -90,7 +90,7 @@ public final function offsetSet($offset, $value) {} /** * Unsets an element in the registry * - * @param string $offset + * @param mixed $offset */ public final function offsetUnset($offset) {} diff --git a/src/Phalcon/Validation.php b/src/Phalcon/Validation.php index 343d3ed6..206f2930 100644 --- a/src/Phalcon/Validation.php +++ b/src/Phalcon/Validation.php @@ -91,7 +91,7 @@ public function rules($field, array $validators) {} /** * Adds filters to the field * - * @param string $field + * @param array|string $field * @param array|string $filters * @return Validation */ diff --git a/src/Phalcon/acl/Adapter.php b/src/Phalcon/acl/Adapter.php index 359ab91b..087a0ff2 100644 --- a/src/Phalcon/acl/Adapter.php +++ b/src/Phalcon/acl/Adapter.php @@ -33,21 +33,21 @@ abstract class Adapter implements \Phalcon\Acl\AdapterInterface, \Phalcon\Events /** * Role which the list is checking if it's allowed to certain resource/access * - * @var mixed + * @var string */ protected $_activeRole; /** * Resource which the list is checking if some role can access it * - * @var mixed + * @var string */ protected $_activeResource; /** * Active access which the list is checking if some role can access it * - * @var mixed + * @var string */ protected $_activeAccess; @@ -55,21 +55,21 @@ abstract class Adapter implements \Phalcon\Acl\AdapterInterface, \Phalcon\Events /** * Role which the list is checking if it's allowed to certain resource/access * - * @return mixed + * @return string */ public function getActiveRole() {} /** * Resource which the list is checking if some role can access it * - * @return mixed + * @return string */ public function getActiveResource() {} /** * Active access which the list is checking if some role can access it * - * @return mixed + * @return string */ public function getActiveAccess() {} diff --git a/src/Phalcon/acl/AdapterInterface.php b/src/Phalcon/acl/AdapterInterface.php index 18083be5..c3a95bb5 100644 --- a/src/Phalcon/acl/AdapterInterface.php +++ b/src/Phalcon/acl/AdapterInterface.php @@ -127,7 +127,7 @@ public function deny($roleName, $resourceName, $access, $func = null); * * @param mixed $roleName * @param mixed $resourceName - * @param mixed $access + * @param string $access * @param array $parameters * @return bool */ diff --git a/src/Phalcon/assets/Inline.php b/src/Phalcon/assets/Inline.php index c799a81f..15b0be65 100644 --- a/src/Phalcon/assets/Inline.php +++ b/src/Phalcon/assets/Inline.php @@ -13,31 +13,36 @@ */ class Inline implements \Phalcon\Assets\ResourceInterface { - + /** + * @var string + */ protected $_type; protected $_content; - + /** + * @var bool + */ protected $_filter; protected $_attributes; - + /** + * @return string + */ public function getType() {} public function getContent() {} - + /** + * @return bool + */ public function getFilter() {} - - public function getAttributes() {} - /** * Phalcon\Assets\Inline constructor * @@ -52,7 +57,7 @@ public function __construct($type, $content, $filter = true, $attributes = null) * Sets the inline's type * * @param string $type - * @return Inline + * @return ResourceInterface */ public function setType($type) {} @@ -60,7 +65,7 @@ public function setType($type) {} * Sets if the resource must be filtered or not * * @param bool $filter - * @return Inline + * @return ResourceInterface */ public function setFilter($filter) {} @@ -68,10 +73,17 @@ public function setFilter($filter) {} * Sets extra HTML attributes * * @param array $attributes - * @return Inline + * @return ResourceInterface */ public function setAttributes(array $attributes) {} + /** + * returns extra HTML attributes + * + * @return array|null + */ + public function getAttributes() {} + /** * Gets the resource's key. * diff --git a/src/Phalcon/assets/Resource.php b/src/Phalcon/assets/Resource.php index 496cd112..82a0acf8 100644 --- a/src/Phalcon/assets/Resource.php +++ b/src/Phalcon/assets/Resource.php @@ -29,7 +29,7 @@ class Resource implements \Phalcon\Assets\ResourceInterface protected $_local; /** - * @var boolean + * @var bool */ protected $_filter; @@ -64,7 +64,7 @@ public function getPath() {} public function getLocal() {} /** - * @return boolean + * @return bool */ public function getFilter() {} @@ -97,7 +97,7 @@ public function __construct($type, $path, $local = true, $filter = true, $attrib * Sets the resource's type * * @param string $type - * @return Resource + * @return ResourceInterface */ public function setType($type) {} @@ -121,7 +121,7 @@ public function setLocal($local) {} * Sets if the resource must be filtered or not * * @param bool $filter - * @return Resource + * @return ResourceInterface */ public function setFilter($filter) {} @@ -129,7 +129,7 @@ public function setFilter($filter) {} * Sets extra HTML attributes * * @param array $attributes - * @return Resource + * @return ResourceInterface */ public function setAttributes(array $attributes) {} diff --git a/src/Phalcon/cache/BackendInterface.php b/src/Phalcon/cache/BackendInterface.php index 59b96a55..3191bae6 100644 --- a/src/Phalcon/cache/BackendInterface.php +++ b/src/Phalcon/cache/BackendInterface.php @@ -91,7 +91,7 @@ public function save($keyName = null, $content = null, $lifetime = null, $stopBu /** * Deletes a value from the cache by its key * - * @param int|string $keyName + * @param string $keyName * @return boolean */ public function delete($keyName); @@ -109,7 +109,7 @@ public function queryKeys($prefix = null); * * @param string $keyName * @param int $lifetime - * @return boolean + * @return bool */ public function exists($keyName = null, $lifetime = null); diff --git a/src/Phalcon/db/Adapter.php b/src/Phalcon/db/Adapter.php index 93f52dea..2de182e2 100644 --- a/src/Phalcon/db/Adapter.php +++ b/src/Phalcon/db/Adapter.php @@ -471,7 +471,7 @@ public function dropTable($tableName, $schemaName = null, $ifExists = true) {} * * @param string $viewName * @param array $definition - * @param mixed $schemaName + * @param string $schemaName * @return bool */ public function createView($viewName, array $definition, $schemaName = null) {} @@ -625,8 +625,8 @@ public function listViews($schemaName = null) {} * @param string schema * @return Phalcon\Db\Index[] * @param string $table - * @param mixed $schema - * @return Index[] + * @param string $schema + * @return IndexInterface[] */ public function describeIndexes($table, $schema = null) {} @@ -641,7 +641,7 @@ public function describeIndexes($table, $schema = null) {} * * @param string $table * @param string $schema - * @return Reference[] + * @return ReferenceInterface[] */ public function describeReferences($table, $schema = null) {} diff --git a/src/Phalcon/db/AdapterInterface.php b/src/Phalcon/db/AdapterInterface.php index 863e9267..d207a62d 100644 --- a/src/Phalcon/db/AdapterInterface.php +++ b/src/Phalcon/db/AdapterInterface.php @@ -80,8 +80,8 @@ public function getColumnList($columnList); /** * Appends a LIMIT clause to sqlQuery argument * - * @param mixed $sqlQuery - * @param mixed $number + * @param string $sqlQuery + * @param int $number * @param $string sqlQuery * @param $int number * @return diff --git a/src/Phalcon/db/Column.php b/src/Phalcon/db/Column.php index 813d30fb..4c08e763 100644 --- a/src/Phalcon/db/Column.php +++ b/src/Phalcon/db/Column.php @@ -381,7 +381,7 @@ public function getBindType() {} * Restores the internal state of a Phalcon\Db\Column object * * @param array $data - * @return Column + * @return \Phalcon\Db\ColumnInterface */ public static function __set_state(array $data) {} diff --git a/src/Phalcon/db/Dialect.php b/src/Phalcon/db/Dialect.php index 519d870d..d6021102 100644 --- a/src/Phalcon/db/Dialect.php +++ b/src/Phalcon/db/Dialect.php @@ -81,19 +81,6 @@ public function limit($sqlQuery, $number) {} */ public function forUpdate($sqlQuery) {} - /** - * Returns a SQL modified with a LOCK IN SHARE MODE clause - * - * - * $sql = $dialect->sharedLock("SELECT FROM robots"); - * echo $sql; // SELECT FROM robots LOCK IN SHARE MODE - * - * - * @param string $sqlQuery - * @return string - */ - public function sharedLock($sqlQuery) {} - /** * Gets a list of columns with escaped identifiers * diff --git a/src/Phalcon/db/DialectInterface.php b/src/Phalcon/db/DialectInterface.php index a0cf718f..5345aabd 100644 --- a/src/Phalcon/db/DialectInterface.php +++ b/src/Phalcon/db/DialectInterface.php @@ -155,7 +155,6 @@ public function dropForeignKey($tableName, $schemaName, $referenceName); * @param string $tableName * @param string $schemaName * @param array $definition - * @return string */ public function createTable($tableName, $schemaName, array $definition); diff --git a/src/Phalcon/db/Index.php b/src/Phalcon/db/Index.php index d13091e3..48269222 100644 --- a/src/Phalcon/db/Index.php +++ b/src/Phalcon/db/Index.php @@ -91,7 +91,7 @@ public function __construct($name, array $columns, $type = null) {} * Restore a Phalcon\Db\Index object from export * * @param array $data - * @return Index + * @return IndexInterface */ public static function __set_state(array $data) {} diff --git a/src/Phalcon/db/Reference.php b/src/Phalcon/db/Reference.php index 4bcd6634..c9874b1a 100644 --- a/src/Phalcon/db/Reference.php +++ b/src/Phalcon/db/Reference.php @@ -136,7 +136,7 @@ public function __construct($name, array $definition) {} * Restore a Phalcon\Db\Reference object from export * * @param array $data - * @return Reference + * @return ReferenceInterface */ public static function __set_state(array $data) {} diff --git a/src/Phalcon/db/ResultInterface.php b/src/Phalcon/db/ResultInterface.php index fb0381fd..368397cc 100644 --- a/src/Phalcon/db/ResultInterface.php +++ b/src/Phalcon/db/ResultInterface.php @@ -60,9 +60,11 @@ public function dataSeek($number); * Changes the fetching mode affecting Phalcon\Db\Result\Pdo::fetch() * * @param int $fetchMode + * @param mixed $colNoOrClassNameOrObject + * @param mixed $ctorargs * @return bool */ - public function setFetchMode($fetchMode); + public function setFetchMode($fetchMode, $colNoOrClassNameOrObject = null, $ctorargs = null); /** * Gets the internal PDO result object diff --git a/src/Phalcon/db/adapter/pdo/Mysql.php b/src/Phalcon/db/adapter/pdo/Mysql.php index b8e5c2db..9f505dd2 100644 --- a/src/Phalcon/db/adapter/pdo/Mysql.php +++ b/src/Phalcon/db/adapter/pdo/Mysql.php @@ -41,7 +41,7 @@ class Mysql extends \Phalcon\Db\Adapter\Pdo * * @param string $table * @param string $schema - * @return \Phalcon\Db\Column[] + * @return \Phalcon\Db\ColumnInterface[] */ public function describeColumns($table, $schema = null) {} @@ -71,7 +71,7 @@ public function describeIndexes($table, $schema = null) {} * * @param string $table * @param string $schema - * @return \Phalcon\Db\Reference[] + * @return \Phalcon\Db\ReferenceInterface[] */ public function describeReferences($table, $schema = null) {} diff --git a/src/Phalcon/db/adapter/pdo/Postgresql.php b/src/Phalcon/db/adapter/pdo/Postgresql.php index 36356eb5..25eacf0b 100644 --- a/src/Phalcon/db/adapter/pdo/Postgresql.php +++ b/src/Phalcon/db/adapter/pdo/Postgresql.php @@ -50,7 +50,7 @@ public function connect(array $descriptor = null) {} * * @param string $table * @param string $schema - * @return \Phalcon\Db\Column[] + * @return \Phalcon\Db\ColumnInterface[] */ public function describeColumns($table, $schema = null) {} diff --git a/src/Phalcon/db/adapter/pdo/Sqlite.php b/src/Phalcon/db/adapter/pdo/Sqlite.php index a5e93a46..bcf551fa 100644 --- a/src/Phalcon/db/adapter/pdo/Sqlite.php +++ b/src/Phalcon/db/adapter/pdo/Sqlite.php @@ -46,7 +46,7 @@ public function connect(array $descriptor = null) {} * * @param string $table * @param string $schema - * @return \Phalcon\Db\Column[] + * @return \Phalcon\Db\ColumnInterface[] */ public function describeColumns($table, $schema = null) {} @@ -71,8 +71,8 @@ public function describeIndexes($table, $schema = null) {} * @param string table * @param string schema * @return Phalcon\Db\ReferenceInterface[] - * @param mixed $table - * @param mixed $schema + * @param string $table + * @param string $schema * @return \Phalcon\Db\ReferenceInterface[] */ public function describeReferences($table, $schema = null) {} diff --git a/src/Phalcon/db/dialect/Mysql.php b/src/Phalcon/db/dialect/Mysql.php index 71ad9353..7f2170b0 100644 --- a/src/Phalcon/db/dialect/Mysql.php +++ b/src/Phalcon/db/dialect/Mysql.php @@ -263,4 +263,17 @@ protected function _getTableOptions(array $definition) {} */ public function getForeignKeyChecks() {} + /** + * Returns a SQL modified with a LOCK IN SHARE MODE clause + * + * + * $sql = $dialect->sharedLock("SELECT FROM robots"); + * echo $sql; // SELECT FROM robots LOCK IN SHARE MODE + * + * + * @param string $sqlQuery + * @return string + */ + public function sharedLock($sqlQuery) {} + } diff --git a/src/Phalcon/db/dialect/Postgresql.php b/src/Phalcon/db/dialect/Postgresql.php index 614c2e9b..ff800073 100644 --- a/src/Phalcon/db/dialect/Postgresql.php +++ b/src/Phalcon/db/dialect/Postgresql.php @@ -260,4 +260,13 @@ protected function _castDefault(\Phalcon\Db\ColumnInterface $column) {} */ protected function _getTableOptions(array $definition) {} + /** + * Returns a SQL modified a shared lock statement. For now this method + * returns the original query + * + * @param string $sqlQuery + * @return string + */ + public function sharedLock($sqlQuery) {} + } diff --git a/src/Phalcon/db/dialect/Sqlite.php b/src/Phalcon/db/dialect/Sqlite.php index 6d70dc7f..f71e0ab8 100644 --- a/src/Phalcon/db/dialect/Sqlite.php +++ b/src/Phalcon/db/dialect/Sqlite.php @@ -272,4 +272,13 @@ public function describeReferences($table, $schema = null) {} */ public function tableOptions($table, $schema = null) {} + /** + * Returns a SQL modified a shared lock statement. For now this method + * returns the original query + * + * @param string $sqlQuery + * @return string + */ + public function sharedLock($sqlQuery) {} + } diff --git a/src/Phalcon/di/InjectionAwareInterface.php b/src/Phalcon/di/InjectionAwareInterface.php index e2bd251b..87817d1e 100644 --- a/src/Phalcon/di/InjectionAwareInterface.php +++ b/src/Phalcon/di/InjectionAwareInterface.php @@ -20,7 +20,7 @@ public function setDI(\Phalcon\DiInterface $dependencyInjector); /** * Returns the internal dependency injector * - * @return \Phalcon\DiInterface + * @return null|\Phalcon\DiInterface */ public function getDI(); diff --git a/src/Phalcon/di/Service.php b/src/Phalcon/di/Service.php index a23651e1..c3673ec1 100644 --- a/src/Phalcon/di/Service.php +++ b/src/Phalcon/di/Service.php @@ -99,7 +99,7 @@ public function resolve($parameters = null, \Phalcon\DiInterface $dependencyInje * * @param int $position * @param array $parameter - * @return Service + * @return \Phalcon\Di\ServiceInterface */ public function setParameter($position, array $parameter) {} @@ -122,7 +122,7 @@ public function isResolved() {} * Restore the internal state of a service * * @param array $attributes - * @return Service + * @return \Phalcon\Di\ServiceInterface */ public static function __set_state(array $attributes) {} diff --git a/src/Phalcon/forms/Element.php b/src/Phalcon/forms/Element.php index 414085cb..6c832bf0 100644 --- a/src/Phalcon/forms/Element.php +++ b/src/Phalcon/forms/Element.php @@ -279,7 +279,7 @@ public function appendMessage(\Phalcon\Validation\MessageInterface $message) {} /** * Clears every element in the form to its default value * - * @return Element + * @return ElementInterface */ public function clear() {} diff --git a/src/Phalcon/http/Request.php b/src/Phalcon/http/Request.php index d3b01d28..7ed7b7a7 100644 --- a/src/Phalcon/http/Request.php +++ b/src/Phalcon/http/Request.php @@ -511,7 +511,7 @@ protected final function hasFileHelper($data, $onlySuccessful) {} * Gets attached files as Phalcon\Http\Request\File instances * * @param bool $onlySuccessful - * @return \Phalcon\Http\Request\File[] + * @return \Phalcon\Http\Request\FileInterface[] */ public function getUploadedFiles($onlySuccessful = false) {} @@ -593,7 +593,7 @@ public function getBestAccept() {} /** * Gets a charsets array and their quality accepted by the browser/client from _SERVER["HTTP_ACCEPT_CHARSET"] * - * @return mixed + * @return array */ public function getClientCharsets() {} diff --git a/src/Phalcon/http/RequestInterface.php b/src/Phalcon/http/RequestInterface.php index 23c8c272..493883ff 100644 --- a/src/Phalcon/http/RequestInterface.php +++ b/src/Phalcon/http/RequestInterface.php @@ -164,7 +164,7 @@ public function getPort(); * $_SERVER["REMOTE_ADDR"] and optionally in $_SERVER["HTTP_X_FORWARDED_FOR"] * * @param bool $trustForwardedHeader - * @return string + * @return string|bool */ public function getClientAddress($trustForwardedHeader = false); @@ -258,7 +258,7 @@ public function isConnect(); * Checks whether request include attached files * * @param boolean $onlySuccessful - * @return boolean + * @return int */ public function hasFiles($onlySuccessful = false); diff --git a/src/Phalcon/http/Response.php b/src/Phalcon/http/Response.php index 8c306fa3..31dd3efe 100644 --- a/src/Phalcon/http/Response.php +++ b/src/Phalcon/http/Response.php @@ -71,7 +71,7 @@ public function getDI() {} * * @param int $code * @param string $message - * @return Response + * @return ResponseInterface */ public function setStatusCode($code, $message = null) {} @@ -101,7 +101,7 @@ public function getReasonPhrase() {} * Sets a headers bag for the response externally * * @param \Phalcon\Http\Response\HeadersInterface $headers - * @return Response + * @return ResponseInterface */ public function setHeaders(\Phalcon\Http\Response\HeadersInterface $headers) {} @@ -136,7 +136,7 @@ public function getCookies() {} * * @param string $name * @param mixed $value - * @return Response + * @return ResponseInterface */ public function setHeader($name, $value) {} @@ -148,14 +148,14 @@ public function setHeader($name, $value) {} * * * @param string $header - * @return Response + * @return ResponseInterface */ public function setRawHeader($header) {} /** * Resets all the established headers * - * @return Response + * @return ResponseInterface */ public function resetHeaders() {} @@ -169,7 +169,7 @@ public function resetHeaders() {} * * * @param \DateTime $datetime - * @return Response + * @return ResponseInterface */ public function setExpires(\DateTime $datetime) {} @@ -202,7 +202,7 @@ public function setCache($minutes) {} /** * Sends a Not-Modified response * - * @return Response + * @return ResponseInterface */ public function setNotModified() {} @@ -216,7 +216,7 @@ public function setNotModified() {} * * @param string $contentType * @param mixed $charset - * @return Response + * @return ResponseInterface */ public function setContentType($contentType, $charset = null) {} @@ -228,7 +228,7 @@ public function setContentType($contentType, $charset = null) {} * * * @param int $contentLength - * @return Response + * @return ResponseInterface */ public function setContentLength($contentLength) {} @@ -266,7 +266,7 @@ public function setEtag($etag) {} * @param mixed $location * @param bool $externalRedirect * @param int $statusCode - * @return Response + * @return ResponseInterface */ public function redirect($location = null, $externalRedirect = false, $statusCode = 302) {} @@ -278,7 +278,7 @@ public function redirect($location = null, $externalRedirect = false, $statusCod * * * @param string $content - * @return Response + * @return ResponseInterface */ public function setContent($content) {} @@ -297,7 +297,7 @@ public function setContent($content) {} * @param mixed $content * @param int $jsonOptions * @param int $depth - * @return Response + * @return ResponseInterface */ public function setJsonContent($content, $jsonOptions = 0, $depth = 512) {} @@ -305,7 +305,7 @@ public function setJsonContent($content, $jsonOptions = 0, $depth = 512) {} * Appends a string to the HTTP response body * * @param mixed $content - * @return Response + * @return ResponseInterface */ public function appendContent($content) {} @@ -326,21 +326,21 @@ public function isSent() {} /** * Sends headers to the client * - * @return Response + * @return ResponseInterface */ public function sendHeaders() {} /** * Sends cookies to the client * - * @return Response + * @return ResponseInterface */ public function sendCookies() {} /** * Prints out HTTP response to the client * - * @return Response + * @return ResponseInterface */ public function send() {} @@ -350,7 +350,7 @@ public function send() {} * @param string $filePath * @param mixed $attachmentName * @param mixed $attachment - * @return Response + * @return ResponseInterface */ public function setFileToSend($filePath, $attachmentName = null, $attachment = true) {} diff --git a/src/Phalcon/http/response/Cookies.php b/src/Phalcon/http/response/Cookies.php index 2cddf62e..8f7c5f7a 100644 --- a/src/Phalcon/http/response/Cookies.php +++ b/src/Phalcon/http/response/Cookies.php @@ -109,7 +109,7 @@ public function getDI() {} * Set if cookies in the bag must be automatically encrypted/decrypted * * @param bool $useEncryption - * @return Cookies + * @return \Phalcon\Http\Response\CookiesInterface */ public function useEncryption($useEncryption) {} @@ -146,7 +146,7 @@ public function isUsingEncryption() {} * @param bool $secure * @param string $domain * @param bool $httpOnly - * @return Cookies + * @return \Phalcon\Http\Response\CookiesInterface */ public function set($name, $value = null, $expire = 0, $path = '/', $secure = null, $domain = null, $httpOnly = null) {} @@ -154,7 +154,7 @@ public function set($name, $value = null, $expire = 0, $path = '/', $secure = nu * Gets a cookie from the bag * * @param string $name - * @return \Phalcon\Http\CookieInterface + * @return \Phalcon\Http\Response\CookiesInterface */ public function get($name) {} @@ -186,7 +186,7 @@ public function send() {} /** * Reset set cookies * - * @return Cookies + * @return \Phalcon\Http\Response\CookiesInterface */ public function reset() {} diff --git a/src/Phalcon/http/response/CookiesInterface.php b/src/Phalcon/http/response/CookiesInterface.php index 1646f3d3..cd1c100e 100644 --- a/src/Phalcon/http/response/CookiesInterface.php +++ b/src/Phalcon/http/response/CookiesInterface.php @@ -43,7 +43,7 @@ public function set($name, $value = null, $expire = 0, $path = '/', $secure = nu * Gets a cookie from the bag * * @param string $name - * @return \Phalcon\Http\Cookie + * @return CookiesInterface */ public function get($name); diff --git a/src/Phalcon/http/response/Headers.php b/src/Phalcon/http/response/Headers.php index 08f343a4..7ccc1a96 100644 --- a/src/Phalcon/http/response/Headers.php +++ b/src/Phalcon/http/response/Headers.php @@ -66,7 +66,7 @@ public function toArray() {} * Restore a \Phalcon\Http\Response\Headers object * * @param array $data - * @return Headers + * @return \Phalcon\Http\Response\HeadersInterface */ public static function __set_state(array $data) {} diff --git a/src/Phalcon/logger/adapter/Syslog.php b/src/Phalcon/logger/adapter/Syslog.php index df7fc414..bf684c7c 100644 --- a/src/Phalcon/logger/adapter/Syslog.php +++ b/src/Phalcon/logger/adapter/Syslog.php @@ -42,7 +42,7 @@ public function __construct($name, $options = null) {} /** * Returns the internal formatter * - * @return \Phalcon\Logger\Formatter\Syslog + * @return \Phalcon\Logger\FormatterInterface */ public function getFormatter() {} diff --git a/src/Phalcon/mvc/Collection.php b/src/Phalcon/mvc/Collection.php index 28ca43c1..14296c3d 100644 --- a/src/Phalcon/mvc/Collection.php +++ b/src/Phalcon/mvc/Collection.php @@ -484,7 +484,7 @@ public function update() {} * * * @param mixed $id - * @return null|Collection + * @return null|CollectionInterface */ public static function findById($id) {} @@ -700,7 +700,7 @@ public function serialize() {} /** * Unserializes the object from a serialized string * - * @param string $data + * @param mixed $data */ public function unserialize($data) {} diff --git a/src/Phalcon/mvc/CollectionInterface.php b/src/Phalcon/mvc/CollectionInterface.php index c62f3feb..ab22a531 100644 --- a/src/Phalcon/mvc/CollectionInterface.php +++ b/src/Phalcon/mvc/CollectionInterface.php @@ -125,7 +125,7 @@ public function save(); * Find a document by its id * * @param string $id - * @return CollectionInterface + * @return null|CollectionInterface */ public static function findById($id); diff --git a/src/Phalcon/mvc/Model.php b/src/Phalcon/mvc/Model.php index 48e1f99e..85fada49 100644 --- a/src/Phalcon/mvc/Model.php +++ b/src/Phalcon/mvc/Model.php @@ -200,7 +200,7 @@ public function getModelsManager() {} * * * @param \Phalcon\Mvc\Model\TransactionInterface $transaction - * @return Model + * @return ModelInterface */ public function setTransaction(\Phalcon\Mvc\Model\TransactionInterface $transaction) {} @@ -1569,7 +1569,7 @@ public function serialize() {} /** * Unserializes the object from a serialized string * - * @param string $data + * @param mixed $data */ public function unserialize($data) {} diff --git a/src/Phalcon/mvc/Router.php b/src/Phalcon/mvc/Router.php index 26d075df..69a4e1af 100644 --- a/src/Phalcon/mvc/Router.php +++ b/src/Phalcon/mvc/Router.php @@ -100,6 +100,28 @@ class Router implements \Phalcon\Di\InjectionAwareInterface, \Phalcon\Mvc\Router protected $_notFoundPaths; + protected $_keyRouteNames = array(); + + + protected $_keyRouteIds = array(); + + + + public function getKeyRouteNames() {} + + /** + * @param mixed $keyRouteNames + */ + public function setKeyRouteNames($keyRouteNames) {} + + + public function getKeyRouteIds() {} + + /** + * @param mixed $keyRouteIds + */ + public function setKeyRouteIds($keyRouteIds) {} + /** * Phalcon\Mvc\Router constructor * diff --git a/src/Phalcon/mvc/RouterInterface.php b/src/Phalcon/mvc/RouterInterface.php index f257540b..6f7adef2 100644 --- a/src/Phalcon/mvc/RouterInterface.php +++ b/src/Phalcon/mvc/RouterInterface.php @@ -225,7 +225,7 @@ public function getRoutes(); * Returns a route object by its id * * @param mixed $id - * @return \Phalcon\Mvc\Router\RouteInterface + * @return bool|\Phalcon\Mvc\Router\RouteInterface */ public function getRouteById($id); @@ -233,7 +233,7 @@ public function getRouteById($id); * Returns a route object by its name * * @param string $name - * @return \Phalcon\Mvc\Router\RouteInterface + * @return bool|\Phalcon\Mvc\Router\RouteInterface */ public function getRouteByName($name); diff --git a/src/Phalcon/mvc/UrlInterface.php b/src/Phalcon/mvc/UrlInterface.php index 5629aad8..567b066a 100644 --- a/src/Phalcon/mvc/UrlInterface.php +++ b/src/Phalcon/mvc/UrlInterface.php @@ -44,9 +44,10 @@ public function getBasePath(); * @param string|array $uri * @param array|object $args Optional arguments to be appended to the query string * @param bool $local + * @param mixed $baseUri * @return string */ - public function get($uri = null, $args = null, $local = null); + public function get($uri = null, $args = null, $local = null, $baseUri = null); /** * Generates a local path diff --git a/src/Phalcon/mvc/ViewBaseInterface.php b/src/Phalcon/mvc/ViewBaseInterface.php index db852772..d0821d61 100644 --- a/src/Phalcon/mvc/ViewBaseInterface.php +++ b/src/Phalcon/mvc/ViewBaseInterface.php @@ -20,7 +20,7 @@ public function setViewsDir($viewsDir); /** * Gets views directory * - * @return string + * @return string|array */ public function getViewsDir(); @@ -80,7 +80,6 @@ public function getContent(); * * @param string $partialPath * @param mixed $params - * @return string */ public function partial($partialPath, $params = null); diff --git a/src/Phalcon/mvc/ViewInterface.php b/src/Phalcon/mvc/ViewInterface.php index cf1d3046..fb0b5082 100644 --- a/src/Phalcon/mvc/ViewInterface.php +++ b/src/Phalcon/mvc/ViewInterface.php @@ -57,7 +57,7 @@ public function getBasePath(); /** * Sets the render level for the view * - * @param string $level + * @param int $level */ public function setRenderLevel($level); @@ -172,7 +172,7 @@ public function finish(); /** * Returns the path of the view that is currently rendered * - * @return string + * @return string|array */ public function getActiveRenderPath(); diff --git a/src/Phalcon/mvc/collection/Document.php b/src/Phalcon/mvc/collection/Document.php index 0c25dfd4..bbc95b98 100644 --- a/src/Phalcon/mvc/collection/Document.php +++ b/src/Phalcon/mvc/collection/Document.php @@ -22,14 +22,14 @@ public function offsetExists($index) {} /** * Returns the value of a field using the ArrayAccess interfase * - * @param string $index + * @param mixed $index */ public function offsetGet($index) {} /** * Change a value using the ArrayAccess interface * - * @param string $index + * @param mixed $index * @param mixed $value */ public function offsetSet($index, $value) {} diff --git a/src/Phalcon/mvc/micro/Collection.php b/src/Phalcon/mvc/micro/Collection.php index 3c059e2b..8b312466 100644 --- a/src/Phalcon/mvc/micro/Collection.php +++ b/src/Phalcon/mvc/micro/Collection.php @@ -50,7 +50,7 @@ protected function _addMap($method, $routePattern, $handler, $name) {} * Sets a prefix for all routes added to the collection * * @param string $prefix - * @return Collection + * @return CollectionInterface */ public function setPrefix($prefix) {} @@ -81,7 +81,7 @@ public function setHandler($handler, $lazy = false) {} * Sets if the main handler must be lazy loaded * * @param bool $lazy - * @return Collection + * @return CollectionInterface */ public function setLazy($lazy) {} diff --git a/src/Phalcon/mvc/model/BinderInterface.php b/src/Phalcon/mvc/model/BinderInterface.php index e031cc46..ddd77ec2 100644 --- a/src/Phalcon/mvc/model/BinderInterface.php +++ b/src/Phalcon/mvc/model/BinderInterface.php @@ -38,7 +38,7 @@ public function setCache(\Phalcon\Cache\BackendInterface $cache); * @param object $handler * @param array $params * @param string $cacheKey - * @param string $methodName + * @param mixed $methodName * @return array */ public function bindToHandler($handler, array $params, $cacheKey, $methodName = null); diff --git a/src/Phalcon/mvc/model/Criteria.php b/src/Phalcon/mvc/model/Criteria.php index 4c4fb544..e39987a0 100644 --- a/src/Phalcon/mvc/model/Criteria.php +++ b/src/Phalcon/mvc/model/Criteria.php @@ -55,7 +55,7 @@ public function getDI() {} * Set a model on which the query will be executed * * @param string $modelName - * @return Criteria + * @return \Phalcon\Mvc\Model\CriteriaInterface */ public function setModelName($modelName) {} @@ -72,7 +72,7 @@ public function getModelName() {} * * @param array $bindParams * @param bool $merge - * @return Criteria + * @return \Phalcon\Mvc\Model\CriteriaInterface */ public function bind(array $bindParams, $merge = false) {} @@ -81,7 +81,7 @@ public function bind(array $bindParams, $merge = false) {} * This method replaces all previously set bound parameters * * @param array $bindTypes - * @return Criteria + * @return \Phalcon\Mvc\Model\CriteriaInterface */ public function bindTypes(array $bindTypes) {} @@ -178,7 +178,7 @@ public function rightJoin($model, $conditions = null, $alias = null) {} * @param string $conditions * @param mixed $bindParams * @param mixed $bindTypes - * @return Criteria + * @return \Phalcon\Mvc\Model\CriteriaInterface */ public function where($conditions, $bindParams = null, $bindTypes = null) {} @@ -201,7 +201,7 @@ public function addWhere($conditions, $bindParams = null, $bindTypes = null) {} * @param string $conditions * @param mixed $bindParams * @param mixed $bindTypes - * @return Criteria + * @return \Phalcon\Mvc\Model\CriteriaInterface */ public function andWhere($conditions, $bindParams = null, $bindTypes = null) {} @@ -211,7 +211,7 @@ public function andWhere($conditions, $bindParams = null, $bindTypes = null) {} * @param string $conditions * @param mixed $bindParams * @param mixed $bindTypes - * @return Criteria + * @return \Phalcon\Mvc\Model\CriteriaInterface */ public function orWhere($conditions, $bindParams = null, $bindTypes = null) {} @@ -225,7 +225,7 @@ public function orWhere($conditions, $bindParams = null, $bindTypes = null) {} * @param string $expr * @param mixed $minimum * @param mixed $maximum - * @return Criteria + * @return \Phalcon\Mvc\Model\CriteriaInterface */ public function betweenWhere($expr, $minimum, $maximum) {} @@ -239,7 +239,7 @@ public function betweenWhere($expr, $minimum, $maximum) {} * @param string $expr * @param mixed $minimum * @param mixed $maximum - * @return Criteria + * @return \Phalcon\Mvc\Model\CriteriaInterface */ public function notBetweenWhere($expr, $minimum, $maximum) {} @@ -252,7 +252,7 @@ public function notBetweenWhere($expr, $minimum, $maximum) {} * * @param string $expr * @param array $values - * @return Criteria + * @return \Phalcon\Mvc\Model\CriteriaInterface */ public function inWhere($expr, array $values) {} @@ -265,7 +265,7 @@ public function inWhere($expr, array $values) {} * * @param string $expr * @param array $values - * @return Criteria + * @return \Phalcon\Mvc\Model\CriteriaInterface */ public function notInWhere($expr, array $values) {} @@ -273,7 +273,7 @@ public function notInWhere($expr, array $values) {} * Adds the conditions parameter to the criteria * * @param string $conditions - * @return Criteria + * @return \Phalcon\Mvc\Model\CriteriaInterface */ public function conditions($conditions) {} @@ -291,7 +291,7 @@ public function order($orderColumns) {} * Adds the order-by clause to the criteria * * @param string $orderColumns - * @return Criteria + * @return \Phalcon\Mvc\Model\CriteriaInterface */ public function orderBy($orderColumns) {} @@ -322,7 +322,7 @@ public function having($having) {} * * @param int $limit * @param mixed $offset - * @return Criteria + * @return \Phalcon\Mvc\Model\CriteriaInterface */ public function limit($limit, $offset = null) {} @@ -330,7 +330,7 @@ public function limit($limit, $offset = null) {} * Adds the "for_update" parameter to the criteria * * @param bool $forUpdate - * @return Criteria + * @return \Phalcon\Mvc\Model\CriteriaInterface */ public function forUpdate($forUpdate = true) {} @@ -338,7 +338,7 @@ public function forUpdate($forUpdate = true) {} * Adds the "shared_lock" parameter to the criteria * * @param bool $sharedLock - * @return Criteria + * @return \Phalcon\Mvc\Model\CriteriaInterface */ public function sharedLock($sharedLock = true) {} diff --git a/src/Phalcon/mvc/model/CriteriaInterface.php b/src/Phalcon/mvc/model/CriteriaInterface.php index 470edb14..cd77f6dc 100644 --- a/src/Phalcon/mvc/model/CriteriaInterface.php +++ b/src/Phalcon/mvc/model/CriteriaInterface.php @@ -30,9 +30,10 @@ public function getModelName(); * This method replaces all previously set bound parameters * * @param array $bindParams + * @param bool $merge * @return CriteriaInterface */ - public function bind(array $bindParams); + public function bind(array $bindParams, $merge = false); /** * Sets the bind types in the criteria @@ -47,9 +48,11 @@ public function bindTypes(array $bindTypes); * Sets the conditions parameter in the criteria * * @param string $conditions + * @param mixed $bindParams + * @param mixed $bindTypes * @return CriteriaInterface */ - public function where($conditions); + public function where($conditions, $bindParams = null, $bindTypes = null); /** * Adds the conditions parameter to the criteria diff --git a/src/Phalcon/mvc/model/ManagerInterface.php b/src/Phalcon/mvc/model/ManagerInterface.php index c5c86de1..27bc4070 100644 --- a/src/Phalcon/mvc/model/ManagerInterface.php +++ b/src/Phalcon/mvc/model/ManagerInterface.php @@ -138,7 +138,7 @@ public function load($modelName, $newInstance = false); * @param array $options * @param \Phalcon\Mvc\ModelInterface $model * @param mixed $fields - * @param mixed $referencedModel + * @param string $referencedModel * @param mixed $referencedFields * @param mixed $options * @return \Phalcon\Mvc\Model\RelationInterface @@ -154,7 +154,7 @@ public function addHasOne(\Phalcon\Mvc\ModelInterface $model, $fields, $referenc * @param array $options * @param \Phalcon\Mvc\ModelInterface $model * @param mixed $fields - * @param mixed $referencedModel + * @param string $referencedModel * @param mixed $referencedFields * @param mixed $options * @param $\Phalcon\Mvc\ModelInterface $model @@ -171,7 +171,7 @@ public function addBelongsTo(\Phalcon\Mvc\ModelInterface $model, $fields, $refer * @param array $options * @param \Phalcon\Mvc\ModelInterface $model * @param mixed $fields - * @param mixed $referencedModel + * @param string $referencedModel * @param mixed $referencedFields * @param mixed $options * @param $\Phalcon\Mvc\ModelInterface $model @@ -182,8 +182,8 @@ public function addHasMany(\Phalcon\Mvc\ModelInterface $model, $fields, $referen /** * Checks whether a model has a belongsTo relation with another model * - * @param mixed $modelName - * @param mixed $modelRelation + * @param string $modelName + * @param string $modelRelation * @param $string $modelRelation * @return */ @@ -192,8 +192,8 @@ public function existsBelongsTo($modelName, $modelRelation); /** * Checks whether a model has a hasMany relation with another model * - * @param mixed $modelName - * @param mixed $modelRelation + * @param string $modelName + * @param string $modelRelation * @param $string $modelRelation * @return */ @@ -202,8 +202,8 @@ public function existsHasMany($modelName, $modelRelation); /** * Checks whether a model has a hasOne relation with another model * - * @param mixed $modelName - * @param mixed $modelRelation + * @param string $modelName + * @param string $modelRelation * @param $string $modelRelation * @return */ @@ -307,9 +307,10 @@ public function createQuery($phql); * * @param string $phql * @param array $placeholders + * @param array $types * @return \Phalcon\Mvc\Model\QueryInterface */ - public function executeQuery($phql, $placeholders = null); + public function executeQuery($phql, $placeholders = null, $types = null); /** * Creates a Phalcon\Mvc\Model\Query\Builder diff --git a/src/Phalcon/mvc/model/Message.php b/src/Phalcon/mvc/model/Message.php index 1f73d3c7..971efcd9 100644 --- a/src/Phalcon/mvc/model/Message.php +++ b/src/Phalcon/mvc/model/Message.php @@ -29,10 +29,14 @@ */ class Message implements \Phalcon\Mvc\Model\MessageInterface { - + /** + * @var string + */ protected $_type; - + /** + * @var string + */ protected $_message; @@ -45,6 +49,16 @@ class Message implements \Phalcon\Mvc\Model\MessageInterface protected $_code; + /** + * @return string + */ + public function getType() {} + + /** + * @return string + */ + public function getMessage() {} + /** * Phalcon\Mvc\Model\Message constructor * @@ -64,13 +78,6 @@ public function __construct($message, $field = null, $type = null, $model = null */ public function setType($type) {} - /** - * Returns message type - * - * @return string - */ - public function getType() {} - /** * Sets verbose message * @@ -79,13 +86,6 @@ public function getType() {} */ public function setMessage($message) {} - /** - * Returns verbose message - * - * @return string - */ - public function getMessage() {} - /** * Sets field name related to message * @@ -140,7 +140,7 @@ public function __toString() {} * Magic __set_state helps to re-build messages variable exporting * * @param array $message - * @return Message + * @return \Phalcon\Mvc\Model\MessageInterface */ public static function __set_state(array $message) {} diff --git a/src/Phalcon/mvc/model/ResultInterface.php b/src/Phalcon/mvc/model/ResultInterface.php index 287c6940..12423705 100644 --- a/src/Phalcon/mvc/model/ResultInterface.php +++ b/src/Phalcon/mvc/model/ResultInterface.php @@ -13,7 +13,7 @@ interface ResultInterface /** * Sets the object's state * - * @param boolean $dirtyState + * @param integer $dirtyState */ public function setDirtyState($dirtyState); diff --git a/src/Phalcon/mvc/model/Resultset.php b/src/Phalcon/mvc/model/Resultset.php index fc8d4473..5e2e1bb8 100644 --- a/src/Phalcon/mvc/model/Resultset.php +++ b/src/Phalcon/mvc/model/Resultset.php @@ -129,7 +129,7 @@ public final function rewind() {} * Changes the internal pointer to a specific position in the resultset. * Set the new position if required, and then set this->_row * - * @param int $position + * @param mixed $position */ public final function seek($position) {} @@ -143,7 +143,7 @@ public final function count() {} /** * Checks whether offset exists in the resultset * - * @param int $index + * @param mixed $index * @return bool */ public function offsetExists($index) {} @@ -151,7 +151,7 @@ public function offsetExists($index) {} /** * Gets row in a specific position of the resultset * - * @param int $index + * @param mixed $index * @return bool|\Phalcon\Mvc\ModelInterface */ public function offsetGet($index) {} @@ -167,7 +167,7 @@ public function offsetSet($index, $value) {} /** * Resultsets cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface * - * @param int $offset + * @param mixed $offset */ public function offsetUnset($offset) {} diff --git a/src/Phalcon/mvc/model/TransactionInterface.php b/src/Phalcon/mvc/model/TransactionInterface.php index 8679acdf..d1715dee 100644 --- a/src/Phalcon/mvc/model/TransactionInterface.php +++ b/src/Phalcon/mvc/model/TransactionInterface.php @@ -34,7 +34,7 @@ public function commit(); /** * Rollbacks the transaction * - * @param string $rollbackMessage + * @param mixed $rollbackMessage * @param \Phalcon\Mvc\ModelInterface $rollbackRecord */ public function rollback($rollbackMessage = null, \Phalcon\Mvc\ModelInterface $rollbackRecord = null); diff --git a/src/Phalcon/mvc/model/metadata/Files.php b/src/Phalcon/mvc/model/metadata/Files.php index 876adc36..419c3016 100644 --- a/src/Phalcon/mvc/model/metadata/Files.php +++ b/src/Phalcon/mvc/model/metadata/Files.php @@ -8,7 +8,7 @@ * Stores model meta-data in PHP files. * * - * $metaData = new \Phalcon\Mvc\Model\Metadata\Files( + * $metaData = new \Phalcon\Mvc\Model\MetaData\Files( * [ * "metaDataDir" => "app/cache/metadata/", * ] diff --git a/src/Phalcon/mvc/model/query/Builder.php b/src/Phalcon/mvc/model/query/Builder.php index d79bb4c5..df6ecfc3 100644 --- a/src/Phalcon/mvc/model/query/Builder.php +++ b/src/Phalcon/mvc/model/query/Builder.php @@ -411,7 +411,7 @@ public function notBetweenWhere($expr, $minimum, $maximum, $operator = BuilderIn * @param string $expr * @param array $values * @param string $operator - * @return Builder + * @return \Phalcon\Mvc\Model\Query\BuilderInterface */ public function inWhere($expr, array $values, $operator = BuilderInterface::OPERATOR_AND) {} @@ -425,7 +425,7 @@ public function inWhere($expr, array $values, $operator = BuilderInterface::OPER * @param string $expr * @param array $values * @param string $operator - * @return Builder + * @return \Phalcon\Mvc\Model\Query\BuilderInterface */ public function notInWhere($expr, array $values, $operator = BuilderInterface::OPERATOR_AND) {} diff --git a/src/Phalcon/mvc/model/resultset/Complex.php b/src/Phalcon/mvc/model/resultset/Complex.php index 3313b0a4..793e38d0 100644 --- a/src/Phalcon/mvc/model/resultset/Complex.php +++ b/src/Phalcon/mvc/model/resultset/Complex.php @@ -53,7 +53,7 @@ public function serialize() {} /** * Unserializing a resultset will allow to only works on the rows present in the saved state * - * @param string $data + * @param mixed $data */ public function unserialize($data) {} diff --git a/src/Phalcon/mvc/model/resultset/Simple.php b/src/Phalcon/mvc/model/resultset/Simple.php index addac92c..8d377287 100644 --- a/src/Phalcon/mvc/model/resultset/Simple.php +++ b/src/Phalcon/mvc/model/resultset/Simple.php @@ -58,7 +58,7 @@ public function serialize() {} /** * Unserializing a resultset will allow to only works on the rows present in the saved state * - * @param string $data + * @param mixed $data */ public function unserialize($data) {} diff --git a/src/Phalcon/mvc/router/Route.php b/src/Phalcon/mvc/router/Route.php index 0cb23f50..8397b84f 100644 --- a/src/Phalcon/mvc/router/Route.php +++ b/src/Phalcon/mvc/router/Route.php @@ -46,6 +46,9 @@ class Route implements \Phalcon\Mvc\Router\RouteInterface static protected $_uniqueId; + + public function getId() {} + /** * Phalcon\Mvc\Router\Route constructor * @@ -236,7 +239,7 @@ public function getReversedPaths() {} * * * @param mixed $httpMethods - * @return Route + * @return RouteInterface */ public function setHttpMethods($httpMethods) {} @@ -255,7 +258,7 @@ public function getHttpMethods() {} * * * @param string $hostname - * @return Route + * @return RouteInterface */ public function setHostname($hostname) {} @@ -284,6 +287,30 @@ public function getGroup() {} /** * Adds a converter to perform an additional transformation for certain parameter * + * + * $router = new Phalcon\Mvc\Router(false); //create Router without default routes + * $route = $router->add("/catalog/([a-zA-Z0-9\_\-]+)/([^\?]+)", [ + * "controller" => "catalog", + * "action" => "show", + * "name" => 1, + * "params_" => 2, + * ]); + * + * //additional parsing + * $route->convert( + * 'params_', + * function ($string) { + * $array = explode('/', $string); + * array_walk($array, function (&$string) { + * $string = explode('-', $string); + * }); + * + * return $array; + * }); + * $router->handle("https://site.com/controller_name/param1-val1-val2/param2-val3"); + * //result is: `["params_"] = [["param1","val1","val2"], ["param2","val3"]]` + * + * * @param string $name * @param mixed $converter * @return Route diff --git a/src/Phalcon/mvc/view/EngineInterface.php b/src/Phalcon/mvc/view/EngineInterface.php index 1246301f..e057f53f 100644 --- a/src/Phalcon/mvc/view/EngineInterface.php +++ b/src/Phalcon/mvc/view/EngineInterface.php @@ -13,7 +13,7 @@ interface EngineInterface /** * Returns cached output on another view stage * - * @return array + * @return string */ public function getContent(); diff --git a/src/Phalcon/mvc/view/engine/volt/Compiler.php b/src/Phalcon/mvc/view/engine/volt/Compiler.php index e85c497d..5762e67c 100644 --- a/src/Phalcon/mvc/view/engine/volt/Compiler.php +++ b/src/Phalcon/mvc/view/engine/volt/Compiler.php @@ -419,7 +419,7 @@ public function compileString($viewCode, $extendsMode = false) {} * Compiles a template into a file forcing the destination path * * - * $compiler->compile("views/layouts/main.volt", "views/layouts/main.volt.php"); + * $compiler->compileFile("views/layouts/main.volt", "views/layouts/main.volt.php"); * * * @param string $path diff --git a/src/Phalcon/paginator/Adapter.php b/src/Phalcon/paginator/Adapter.php index fe515685..20238657 100644 --- a/src/Phalcon/paginator/Adapter.php +++ b/src/Phalcon/paginator/Adapter.php @@ -18,6 +18,13 @@ abstract class Adapter implements \Phalcon\Paginator\AdapterInterface protected $_page = null; + /** + * Get current rows limit + * + * @return int + */ + public function getLimit() {} + /** * Set the current page number * @@ -34,11 +41,4 @@ public function setCurrentPage($page) {} */ public function setLimit($limitRows) {} - /** - * Get current rows limit - * - * @return int - */ - public function getLimit() {} - } diff --git a/src/Phalcon/paginator/AdapterInterface.php b/src/Phalcon/paginator/AdapterInterface.php index 6585ff60..d88843fb 100644 --- a/src/Phalcon/paginator/AdapterInterface.php +++ b/src/Phalcon/paginator/AdapterInterface.php @@ -20,6 +20,7 @@ public function setCurrentPage($page); /** * Returns a slice of the resultset to show in the pagination * + * @deprecated will be removed after 4.0 * @return \stdClass */ public function getPaginate(); diff --git a/src/Phalcon/paginator/adapter/Model.php b/src/Phalcon/paginator/adapter/Model.php index 70487037..a07f7755 100644 --- a/src/Phalcon/paginator/adapter/Model.php +++ b/src/Phalcon/paginator/adapter/Model.php @@ -39,8 +39,16 @@ public function __construct(array $config) {} /** * Returns a slice of the resultset to show in the pagination * + * @deprecated will be removed after 4.0 * @return \stdClass */ public function getPaginate() {} + /** + * Returns a slice of the resultset to show in the pagination + * + * @return \stdClass + */ + public function paginate() {} + } diff --git a/src/Phalcon/paginator/adapter/NativeArray.php b/src/Phalcon/paginator/adapter/NativeArray.php index e8e04247..39fee906 100644 --- a/src/Phalcon/paginator/adapter/NativeArray.php +++ b/src/Phalcon/paginator/adapter/NativeArray.php @@ -43,8 +43,16 @@ public function __construct(array $config) {} /** * Returns a slice of the resultset to show in the pagination * + * @deprecated will be removed after 4.0 * @return \stdClass */ public function getPaginate() {} + /** + * Returns a slice of the resultset to show in the pagination + * + * @return \stdClass + */ + public function paginate() {} + } diff --git a/src/Phalcon/paginator/adapter/QueryBuilder.php b/src/Phalcon/paginator/adapter/QueryBuilder.php index e5c389c2..ed229f0a 100644 --- a/src/Phalcon/paginator/adapter/QueryBuilder.php +++ b/src/Phalcon/paginator/adapter/QueryBuilder.php @@ -74,8 +74,16 @@ public function getQueryBuilder() {} /** * Returns a slice of the resultset to show in the pagination * + * @deprecated `will be removed after 4.0 * @return \stdClass */ public function getPaginate() {} + /** + * Returns a slice of the resultset to show in the pagination + * + * @return \stdClass + */ + public function paginate() {} + } diff --git a/src/Phalcon/session/Adapter.php b/src/Phalcon/session/Adapter.php index 6f7a2569..aca058c7 100644 --- a/src/Phalcon/session/Adapter.php +++ b/src/Phalcon/session/Adapter.php @@ -82,7 +82,7 @@ public function getName() {} * {@inheritdoc} * * @param bool $deleteOldSession - * @return Adapter + * @return AdapterInterface */ public function regenerateId($deleteOldSession = true) {} @@ -185,10 +185,10 @@ public function isStarted() {} * ); * * - * @param bool $removeData + * @param mixed $removeData * @return bool */ - public function destroy($removeData = false) {} + public function destroy($removeData = null) {} /** * Returns the status of the current session. diff --git a/src/Phalcon/session/AdapterInterface.php b/src/Phalcon/session/AdapterInterface.php index a76ecd6e..aba0f232 100644 --- a/src/Phalcon/session/AdapterInterface.php +++ b/src/Phalcon/session/AdapterInterface.php @@ -78,10 +78,10 @@ public function isStarted(); /** * Destroys the active session * - * @param bool $removeData + * @param mixed $removeData * @return bool */ - public function destroy($removeData = false); + public function destroy($removeData = null); /** * Regenerate session's id diff --git a/src/Phalcon/session/Bag.php b/src/Phalcon/session/Bag.php index 4dedfa4b..96d67e32 100644 --- a/src/Phalcon/session/Bag.php +++ b/src/Phalcon/session/Bag.php @@ -188,24 +188,24 @@ public final function count() {} public final function getIterator() {} /** - * @param string $property + * @param mixed $property * @param mixed $value */ public final function offsetSet($property, $value) {} /** - * @param string $property + * @param mixed $property * @return bool */ public final function offsetExists($property) {} /** - * @param string $property + * @param mixed $property */ public final function offsetUnset($property) {} /** - * @param string $property + * @param mixed $property * @return mixed */ public final function offsetGet($property) {} diff --git a/src/Phalcon/session/adapter/Libmemcached.php b/src/Phalcon/session/adapter/Libmemcached.php index 74581366..c1d60223 100644 --- a/src/Phalcon/session/adapter/Libmemcached.php +++ b/src/Phalcon/session/adapter/Libmemcached.php @@ -88,7 +88,7 @@ public function write($sessionId, $data) {} /** * {@inheritdoc} * - * @param string $sessionId + * @param mixed $sessionId * @return bool */ public function destroy($sessionId = null) {} diff --git a/src/Phalcon/session/adapter/Memcache.php b/src/Phalcon/session/adapter/Memcache.php index dab1fcb7..c5cac728 100644 --- a/src/Phalcon/session/adapter/Memcache.php +++ b/src/Phalcon/session/adapter/Memcache.php @@ -80,7 +80,7 @@ public function write($sessionId, $data) {} /** * {@inheritdoc} * - * @param string $sessionId + * @param mixed $sessionId * @return bool */ public function destroy($sessionId = null) {} diff --git a/src/Phalcon/session/adapter/Redis.php b/src/Phalcon/session/adapter/Redis.php index 26e847a8..179e2d47 100644 --- a/src/Phalcon/session/adapter/Redis.php +++ b/src/Phalcon/session/adapter/Redis.php @@ -86,7 +86,7 @@ public function write($sessionId, $data) {} /** * {@inheritdoc} * - * @param string $sessionId + * @param mixed $sessionId * @return bool */ public function destroy($sessionId = null) {} diff --git a/src/Phalcon/translate/Adapter.php b/src/Phalcon/translate/Adapter.php index 37190e11..42b3d83b 100644 --- a/src/Phalcon/translate/Adapter.php +++ b/src/Phalcon/translate/Adapter.php @@ -55,7 +55,7 @@ public function offsetSet($offset, $value) {} /** * Check whether a translation key exists * - * @param string $translateKey + * @param mixed $translateKey * @return bool */ public function offsetExists($translateKey) {} diff --git a/src/Phalcon/validation/Message.php b/src/Phalcon/validation/Message.php index e0ab29a9..b9249bad 100644 --- a/src/Phalcon/validation/Message.php +++ b/src/Phalcon/validation/Message.php @@ -103,7 +103,7 @@ public function __toString() {} * Magic __set_state helps to recover messages from serialization * * @param array $message - * @return Message + * @return \Phalcon\Validation\MessageInterface */ public static function __set_state(array $message) {}