diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ce8e64848..6c4a00f42 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -5,27 +5,29 @@ Hello! This pull request affects the following components: **(please check boxes)** -* [ ] Core -* [ ] WebTools -* [ ] Migrations -* [ ] Models -* [ ] Scaffold -* [ ] Documentation -* [ ] IDE -* [ ] MySQL -* [ ] PostgreSQL -* [ ] Oracle -* [ ] SQLite -* [ ] Testing -* [ ] Code Quality -* [ ] Templating +- [ ] Core +- [ ] WebTools +- [ ] Migrations +- [ ] Models +- [ ] Scaffold +- [ ] Documentation +- [ ] IDE +- [ ] MySQL +- [ ] PostgreSQL +- [ ] Oracle +- [ ] SQLite +- [ ] Testing +- [ ] Code Quality +- [ ] Templating **In raising this pull request, I confirm the following (please check boxes):** -- [ ] I have read and understood the [Contributing Guidelines](https://github.com/phalcon/phalcon-devtools/blob/master/CONTRIBUTING.md)? +- [ ] I have read and understood the [Contributing Guidelines][:contrib:]? - [ ] I have checked that another pull request for this purpose does not exist. - [ ] I wrote some tests for this PR. Small description of change: Thanks + +[:contrib:]: https://github.com/phalcon/phalcon-devtools/blob/master/CONTRIBUTING.md diff --git a/composer.json b/composer.json index 09f0419f4..26b36b19f 100644 --- a/composer.json +++ b/composer.json @@ -33,5 +33,5 @@ "Phalcon\\" : "scripts/Phalcon/" } }, - "bin": ["phalcon.php", "phalcon"] + "bin": ["phalcon.php"] } diff --git a/ide/stubs/Phalcon/Acl.php b/ide/stubs/Phalcon/Acl.php index f4de45643..498be5ea7 100644 --- a/ide/stubs/Phalcon/Acl.php +++ b/ide/stubs/Phalcon/Acl.php @@ -4,33 +4,44 @@ /** * Phalcon\Acl + * * This component allows to manage ACL lists. An access control list (ACL) is a list * of permissions attached to an object. An ACL specifies which users or system processes * are granted access to objects, as well as what operations are allowed on given objects. + * * * use Phalcon\Acl; * use Phalcon\Acl\Role; * use Phalcon\Acl\Resource; * use Phalcon\Acl\Adapter\Memory; + * * $acl = new Memory(); + * * // Default action is deny access * $acl->setDefaultAction(Acl::DENY); + * * // Create some roles * $roleAdmins = new Role("Administrators", "Super-User role"); * $roleGuests = new Role("Guests"); + * * // Add "Guests" role to acl * $acl->addRole($roleGuests); + * * // Add "Designers" role to acl * $acl->addRole("Designers"); + * * // Define the "Customers" resource * $customersResource = new Resource("Customers", "Customers management"); + * * // Add "customers" resource with a couple of operations * $acl->addResource($customersResource, "search"); * $acl->addResource($customersResource, ["create", "update"]); + * * // Set access level for roles into resources * $acl->allow("Guests", "Customers", "search"); * $acl->allow("Guests", "Customers", "create"); * $acl->deny("Guests", "Customers", "update"); + * * // Check whether role has access to the operations * $acl->isAllowed("Guests", "Customers", "edit"); // Returns 0 * $acl->isAllowed("Guests", "Customers", "search"); // Returns 1 diff --git a/ide/stubs/Phalcon/Application.php b/ide/stubs/Phalcon/Application.php index 7ba75f234..6b5b964a5 100644 --- a/ide/stubs/Phalcon/Application.php +++ b/ide/stubs/Phalcon/Application.php @@ -4,6 +4,7 @@ /** * Phalcon\Application + * * Base class for Phalcon\Cli\Console and Phalcon\Mvc\Application. */ abstract class Application extends \Phalcon\Di\Injectable implements \Phalcon\Events\EventsAwareInterface @@ -28,75 +29,76 @@ abstract class Application extends \Phalcon\Di\Injectable implements \Phalcon\Ev /** * Phalcon\Application * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function __construct(\Phalcon\DiInterface $dependencyInjector = null) {} /** * Sets the events manager * - * @param mixed $eventsManager - * @return Application + * @param \Phalcon\Events\ManagerInterface $eventsManager + * @return Application */ public function setEventsManager(\Phalcon\Events\ManagerInterface $eventsManager) {} /** * Returns the internal event manager * - * @return \Phalcon\Events\ManagerInterface + * @return \Phalcon\Events\ManagerInterface */ public function getEventsManager() {} /** * Register an array of modules present in the application + * * * $this->registerModules( - * [ - * "frontend" => [ - * "className" => "Multiple\\Frontend\\Module", - * "path" => "../apps/frontend/Module.php", - * ], - * "backend" => [ - * "className" => "Multiple\\Backend\\Module", - * "path" => "../apps/backend/Module.php", - * ], - * ] + * [ + * "frontend" => [ + * "className" => "Multiple\\Frontend\\Module", + * "path" => "../apps/frontend/Module.php", + * ], + * "backend" => [ + * "className" => "Multiple\\Backend\\Module", + * "path" => "../apps/backend/Module.php", + * ], + * ] * ); * * - * @param array $modules - * @param bool $merge - * @return Application + * @param array $modules + * @param bool $merge + * @return Application */ public function registerModules(array $modules, $merge = false) {} /** * Return the modules registered in the application * - * @return array + * @return array */ public function getModules() {} /** * Gets the module definition registered in the application via module name * - * @param string $name - * @return array|object + * @param string $name + * @return array|object */ public function getModule($name) {} /** * Sets the module name to be used if the router doesn't return a valid module * - * @param string $defaultModule - * @return Application + * @param string $defaultModule + * @return Application */ public function setDefaultModule($defaultModule) {} /** * Returns the default module name * - * @return string + * @return string */ public function getDefaultModule() {} diff --git a/ide/stubs/Phalcon/Config.php b/ide/stubs/Phalcon/Config.php index 9b51333cc..b99aba2fd 100644 --- a/ide/stubs/Phalcon/Config.php +++ b/ide/stubs/Phalcon/Config.php @@ -4,25 +4,27 @@ /** * Phalcon\Config + * * Phalcon\Config is designed to simplify the access to, and the use of, configuration data within applications. * It provides a nested object property based user interface for accessing this configuration data within * application code. + * * * $config = new \Phalcon\Config( - * [ - * "database" => [ - * "adapter" => "Mysql", - * "host" => "localhost", - * "username" => "scott", - * "password" => "cheetah", - * "dbname" => "test_db", - * ], - * "phalcon" => [ - * "controllersDir" => "../app/controllers/", - * "modelsDir" => "../app/models/", - * "viewsDir" => "../app/views/", - * ], - * ] + * [ + * "database" => [ + * "adapter" => "Mysql", + * "host" => "localhost", + * "username" => "scott", + * "password" => "cheetah", + * "dbname" => "test_db", + * ], + * "phalcon" => [ + * "controllersDir" => "../app/controllers/", + * "modelsDir" => "../app/models/", + * "viewsDir" => "../app/views/", + * ], + * ] * ); * */ @@ -32,130 +34,144 @@ class Config implements \ArrayAccess, \Countable /** * Phalcon\Config constructor * - * @param array $arrayConfig + * @param array $arrayConfig */ public function __construct(array $arrayConfig = null) {} /** * Allows to check whether an attribute is defined using the array-syntax + * * * var_dump( - * isset($config["database"]) + * isset($config["database"]) * ); * * - * @param mixed $index - * @return bool + * @param mixed $index + * @return bool */ public function offsetExists($index) {} /** * Gets an attribute from the configuration, if the attribute isn't defined returns null * If the value is exactly null or is not defined the default value will be used instead + * * * echo $config->get("controllersDir", "../app/controllers/"); * * - * @param mixed $index - * @param mixed $defaultValue - * @return mixed + * @param mixed $index + * @param mixed $defaultValue + * @return mixed */ public function get($index, $defaultValue = null) {} /** * Gets an attribute using the array-syntax + * * * print_r( - * $config["database"] + * $config["database"] * ); * * - * @param mixed $index - * @return string + * @param mixed $index + * @return string */ public function offsetGet($index) {} /** * Sets an attribute using the array-syntax + * * * $config["database"] = [ - * "type" => "Sqlite", + * "type" => "Sqlite", * ]; * * - * @param mixed $index - * @param mixed $value + * @param mixed $index + * @param mixed $value */ public function offsetSet($index, $value) {} /** * Unsets an attribute using the array-syntax + * * * unset($config["database"]); * * - * @param mixed $index + * @param mixed $index */ public function offsetUnset($index) {} /** * Merges a configuration into the current one + * * * $appConfig = new \Phalcon\Config( - * [ - * "database" => [ - * "host" => "localhost", - * ], - * ] + * [ + * "database" => [ + * "host" => "localhost", + * ], + * ] * ); + * * $globalConfig->merge($appConfig); * * - * @param mixed $config - * @return Config + * @param Config $config + * @return Config */ public function merge(Config $config) {} /** * Converts recursively the object to an array + * * * print_r( - * $config->toArray() + * $config->toArray() * ); * * - * @return array + * @return array */ public function toArray() {} /** * Returns the count of properties set in the config + * * * print count($config); * + * * or + * * * print $config->count(); * * - * @return int + * @return int */ public function count() {} /** * Restores the state of a Phalcon\Config object * - * @param array $data - * @return Config + * @param array $data + * @return Config */ public static function __set_state(array $data) {} /** * Helper method for merge configs (forwarding nested config instance) * - * @param Config $config - * @param Config $instance = null - * @return Config config + * + * @param Config instance = null + * + * @param Config $config + * @param mixed $instance + * @return Config */ protected final function _merge(Config $config, $instance = null) {} diff --git a/ide/stubs/Phalcon/Crypt.php b/ide/stubs/Phalcon/Crypt.php index b2a9d9d5f..0971bf0f2 100644 --- a/ide/stubs/Phalcon/Crypt.php +++ b/ide/stubs/Phalcon/Crypt.php @@ -4,12 +4,17 @@ /** * Phalcon\Crypt + * * Provides encryption facilities to phalcon applications + * * * $crypt = new \Phalcon\Crypt(); + * * $key = "le password"; * $text = "This is a secret text"; + * * $encrypted = $crypt->encrypt($text, $key); + * * echo $crypt->decrypt($encrypted, $key); * */ @@ -49,49 +54,50 @@ class Crypt implements \Phalcon\CryptInterface /** * Changes the padding scheme used * - * @param int $scheme - * @return \Phalcon\CryptInterface + * @param int $scheme + * @return \Phalcon\CryptInterface */ public function setPadding($scheme) {} /** * Sets the cipher algorithm * - * @param string $cipher - * @return Crypt + * @param string $cipher + * @return Crypt */ public function setCipher($cipher) {} /** * Returns the current cipher * - * @return string + * @return string */ public function getCipher() {} /** * Sets the encryption key * - * @param string $key - * @return Crypt + * @param string $key + * @return Crypt */ public function setKey($key) {} /** * Returns the encryption key * - * @return string + * @return string */ public function getKey() {} /** * Pads texts before encryption * + * * @see http://www.di-mgt.com.au/cryptopad.html - * @param string $text - * @param string $mode - * @param int $blockSize - * @param int $paddingType + * @param string $text + * @param string $mode + * @param int $blockSize + * @param int $paddingType */ protected function _cryptPadText($text, $mode, $blockSize, $paddingType) {} @@ -99,6 +105,7 @@ protected function _cryptPadText($text, $mode, $blockSize, $paddingType) {} * Removes padding @a padding_type from @a text * If the function detects that the text was not padded, it will return it unmodified * + * * @param string $text Message to be unpadded * @param string $mode Encryption mode; unpadding is applied only in CBC or ECB mode * @param int $blockSize Cipher block size @@ -108,52 +115,54 @@ protected function _cryptUnpadText($text, $mode, $blockSize, $paddingType) {} /** * Encrypts a text + * * * $encrypted = $crypt->encrypt("Ultra-secret text", "encrypt password"); * * - * @param string $text - * @param string $key - * @return string + * @param string $text + * @param string $key + * @return string */ public function encrypt($text, $key = null) {} /** * Decrypts an encrypted text + * * * echo $crypt->decrypt($encrypted, "decrypt password"); * * - * @param string $text - * @param mixed $key - * @return string + * @param string $text + * @param mixed $key + * @return string */ public function decrypt($text, $key = null) {} /** * Encrypts a text returning the result as a base64 string * - * @param string $text - * @param mixed $key - * @param bool $safe - * @return string + * @param string $text + * @param mixed $key + * @param bool $safe + * @return string */ public function encryptBase64($text, $key = null, $safe = false) {} /** * Decrypt a text that is coded as a base64 string * - * @param string $text - * @param mixed $key - * @param bool $safe - * @return string + * @param string $text + * @param mixed $key + * @param bool $safe + * @return string */ public function decryptBase64($text, $key = null, $safe = false) {} /** * Returns a list of available ciphers * - * @return array + * @return array */ public function getAvailableCiphers() {} diff --git a/ide/stubs/Phalcon/CryptInterface.php b/ide/stubs/Phalcon/CryptInterface.php index c04f44f22..7e92972d5 100644 --- a/ide/stubs/Phalcon/CryptInterface.php +++ b/ide/stubs/Phalcon/CryptInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\CryptInterface + * * Interface for Phalcon\Crypt */ interface CryptInterface @@ -12,73 +13,73 @@ interface CryptInterface /** * Sets the cipher algorithm * - * @param string $cipher - * @return CryptInterface + * @param string $cipher + * @return CryptInterface */ public function setCipher($cipher); /** * Returns the current cipher * - * @return string + * @return string */ public function getCipher(); /** * Sets the encryption key * - * @param string $key - * @return CryptInterface + * @param string $key + * @return CryptInterface */ public function setKey($key); /** * Returns the encryption key * - * @return string + * @return string */ public function getKey(); /** * Encrypts a text * - * @param string $text - * @param mixed $key - * @return string + * @param string $text + * @param mixed $key + * @return string */ public function encrypt($text, $key = null); /** * Decrypts a text * - * @param string $text - * @param string $key - * @return string + * @param string $text + * @param string $key + * @return string */ public function decrypt($text, $key = null); /** * Encrypts a text returning the result as a base64 string * - * @param string $text - * @param mixed $key - * @return string + * @param string $text + * @param mixed $key + * @return string */ public function encryptBase64($text, $key = null); /** * Decrypt a text that is coded as a base64 string * - * @param string $text - * @param mixed $key - * @return string + * @param string $text + * @param mixed $key + * @return string */ public function decryptBase64($text, $key = null); /** * Returns a list of available cyphers * - * @return array + * @return array */ public function getAvailableCiphers(); diff --git a/ide/stubs/Phalcon/Db.php b/ide/stubs/Phalcon/Db.php index fef1da1b6..964528738 100644 --- a/ide/stubs/Phalcon/Db.php +++ b/ide/stubs/Phalcon/Db.php @@ -4,35 +4,43 @@ /** * Phalcon\Db + * * Phalcon\Db and its related classes provide a simple SQL database interface for Phalcon Framework. * The Phalcon\Db is the basic class you use to connect your PHP application to an RDBMS. * There is a different adapter class for each brand of RDBMS. + * * This component is intended to lower level database operations. If you want to interact with databases using * higher level of abstraction use Phalcon\Mvc\Model. + * * Phalcon\Db is an abstract class. You only can use it with a database adapter like Phalcon\Db\Adapter\Pdo + * * * use Phalcon\Db; * use Phalcon\Db\Exception; * use Phalcon\Db\Adapter\Pdo\Mysql as MysqlConnection; + * * try { - * $connection = new MysqlConnection( - * [ - * "host" => "192.168.0.11", - * "username" => "sigma", - * "password" => "secret", - * "dbname" => "blog", - * "port" => "3306", - * ] - * ); - * $result = $connection->query( - * "SELECTFROM robots LIMIT 5" - * ); - * $result->setFetchMode(Db::FETCH_NUM); - * while ($robot = $result->fetch()) { - * print_r($robot); - * } + * $connection = new MysqlConnection( + * [ + * "host" => "192.168.0.11", + * "username" => "sigma", + * "password" => "secret", + * "dbname" => "blog", + * "port" => "3306", + * ] + * ); + * + * $result = $connection->query( + * "SELECT FROM robots LIMIT 5" + * ); + * + * $result->setFetchMode(Db::FETCH_NUM); + * + * while ($robot = $result->fetch()) { + * print_r($robot); + * } * } catch (Exception $e) { - * echo $e->getMessage(), PHP_EOL; + * echo $e->getMessage(), PHP_EOL; * } * */ @@ -93,7 +101,7 @@ abstract class Db /** * Enables/disables options in the Database component * - * @param array $options + * @param array $options */ public static function setup(array $options) {} diff --git a/ide/stubs/Phalcon/Debug.php b/ide/stubs/Phalcon/Debug.php index bfc6fcc12..5d75a760b 100644 --- a/ide/stubs/Phalcon/Debug.php +++ b/ide/stubs/Phalcon/Debug.php @@ -4,6 +4,7 @@ /** * Phalcon\Debug + * * Provides debug capabilities to Phalcon applications */ class Debug @@ -36,24 +37,24 @@ class Debug /** * Change the base URI for static resources * - * @param string $uri - * @return Debug + * @param string $uri + * @return Debug */ public function setUri($uri) {} /** * Sets if files the exception's backtrace must be showed * - * @param bool $showBackTrace - * @return Debug + * @param bool $showBackTrace + * @return Debug */ public function setShowBackTrace($showBackTrace) {} /** * Set if files part of the backtrace must be shown in the output * - * @param bool $showFiles - * @return Debug + * @param bool $showFiles + * @return Debug */ public function setShowFiles($showFiles) {} @@ -61,31 +62,31 @@ public function setShowFiles($showFiles) {} * Sets if files must be completely opened and showed in the output * or just the fragment related to the exception * - * @param bool $showFileFragment - * @return Debug + * @param bool $showFileFragment + * @return Debug */ public function setShowFileFragment($showFileFragment) {} /** * Listen for uncaught exceptions and unsilent notices or warnings * - * @param bool $exceptions - * @param bool $lowSeverity - * @return Debug + * @param bool $exceptions + * @param bool $lowSeverity + * @return Debug */ public function listen($exceptions = true, $lowSeverity = false) {} /** * Listen for uncaught exceptions * - * @return Debug + * @return Debug */ public function listenExceptions() {} /** * Listen for unsilent notices or warnings * - * @return Debug + * @return Debug */ public function listenLowSeverity() {} @@ -97,41 +98,41 @@ public function halt() {} /** * Adds a variable to the debug output * - * @param mixed $varz - * @param string $key - * @return Debug + * @param mixed $varz + * @param string $key + * @return Debug */ public function debugVar($varz, $key = null) {} /** * Clears are variables added previously * - * @return Debug + * @return Debug */ public function clearVars() {} /** * Escapes a string with htmlentities * - * @param mixed $value - * @return string + * @param mixed $value + * @return string */ protected function _escapeString($value) {} /** * Produces a recursive representation of an array * - * @param array $argument - * @param mixed $n - * @return string|null + * @param array $argument + * @param mixed $n + * @return string|null */ protected function _getArrayDump(array $argument, $n = 0) {} /** * Produces an string representation of a variable * - * @param mixed $variable - * @return string + * @param mixed $variable + * @return string */ protected function _getVarDump($variable) {} @@ -139,55 +140,55 @@ protected function _getVarDump($variable) {} * Returns the major framework's version * * @deprecated Will be removed in 4.0.0 - * @return string + * @return string */ public function getMajorVersion() {} /** * Generates a link to the current version documentation * - * @return string + * @return string */ public function getVersion() {} /** * Returns the css sources * - * @return string + * @return string */ public function getCssSources() {} /** * Returns the javascript sources * - * @return string + * @return string */ public function getJsSources() {} /** * Shows a backtrace item * - * @param int $n - * @param array $trace + * @param int $n + * @param array $trace */ protected final function showTraceItem($n, array $trace) {} /** * Throws an exception when a notice or warning is raised * - * @param mixed $severity - * @param mixed $message - * @param mixed $file - * @param mixed $line - * @param mixed $context + * @param mixed $severity + * @param mixed $message + * @param mixed $file + * @param mixed $line + * @param mixed $context */ public function onUncaughtLowSeverity($severity, $message, $file, $line, $context) {} /** * Handles uncaught exceptions * - * @param mixed $exception - * @return bool + * @param \Exception $exception + * @return bool */ public function onUncaughtException(\Exception $exception) {} diff --git a/ide/stubs/Phalcon/Di.php b/ide/stubs/Phalcon/Di.php index 66a1643c5..0bfe43f41 100644 --- a/ide/stubs/Phalcon/Di.php +++ b/ide/stubs/Phalcon/Di.php @@ -4,29 +4,38 @@ /** * Phalcon\Di + * * Phalcon\Di is a component that implements Dependency Injection/Service Location * of services and it's itself a container for them. + * * Since Phalcon is highly decoupled, Phalcon\Di is essential to integrate the different * components of the framework. The developer can also use this component to inject dependencies * and manage global instances of the different classes used in the application. + * * Basically, this component implements the `Inversion of Control` pattern. Applying this, * the objects do not receive their dependencies using setters or constructors, but requesting * a service dependency injector. This reduces the overall complexity, since there is only one * way to get the required dependencies within a component. + * * Additionally, this pattern increases testability in the code, thus making it less prone to errors. + * * * use Phalcon\Di; * use Phalcon\Http\Request; + * * $di = new Di(); + * * // Using a string definition * $di->set("request", Request::class, true); + * * // Using an anonymous function * $di->setShared( - * "request", - * function () { - * return new Request(); - * } + * "request", + * function () { + * return new Request(); + * } * ); + * * $request = $di->getRequest(); * */ @@ -50,6 +59,7 @@ class Di implements \Phalcon\DiInterface /** * Events Manager * + * * @var \Phalcon\Events\ManagerInterface */ protected $_eventsManager; @@ -68,33 +78,33 @@ public function __construct() {} /** * Sets the internal event manager * - * @param mixed $eventsManager + * @param \Phalcon\Events\ManagerInterface $eventsManager */ public function setInternalEventsManager(\Phalcon\Events\ManagerInterface $eventsManager) {} /** * Returns the internal event manager * - * @return \Phalcon\Events\ManagerInterface + * @return \Phalcon\Events\ManagerInterface */ public function getInternalEventsManager() {} /** * Registers a service in the services container * - * @param string $name - * @param mixed $definition - * @param bool $shared - * @return \Phalcon\Di\ServiceInterface + * @param string $name + * @param mixed $definition + * @param bool $shared + * @return \Phalcon\Di\ServiceInterface */ public function set($name, $definition, $shared = false) {} /** * Registers an "always shared" service in the services container * - * @param string $name - * @param mixed $definition - * @return \Phalcon\Di\ServiceInterface + * @param string $name + * @param mixed $definition + * @return \Phalcon\Di\ServiceInterface */ public function setShared($name, $definition) {} @@ -102,7 +112,7 @@ public function setShared($name, $definition) {} * Removes a service in the services container * It also removes any shared instance created for the service * - * @param string $name + * @param string $name */ public function remove($name) {} @@ -111,44 +121,44 @@ public function remove($name) {} * Only is successful if a service hasn't been registered previously * with the same name * - * @param string $name - * @param mixed $definition - * @param bool $shared - * @return bool|\Phalcon\Di\ServiceInterface + * @param string $name + * @param mixed $definition + * @param bool $shared + * @return bool|\Phalcon\Di\ServiceInterface */ public function attempt($name, $definition, $shared = false) {} /** * Sets a service using a raw Phalcon\Di\Service definition * - * @param string $name - * @param mixed $rawDefinition - * @return \Phalcon\Di\ServiceInterface + * @param string $name + * @param \Phalcon\Di\ServiceInterface $rawDefinition + * @return \Phalcon\Di\ServiceInterface */ public function setRaw($name, \Phalcon\Di\ServiceInterface $rawDefinition) {} /** * Returns a service definition without resolving * - * @param string $name - * @return mixed + * @param string $name + * @return mixed */ public function getRaw($name) {} /** * Returns a Phalcon\Di\Service instance * - * @param string $name - * @return \Phalcon\Di\ServiceInterface + * @param string $name + * @return \Phalcon\Di\ServiceInterface */ public function getService($name) {} /** * Resolves the service based on its configuration * - * @param string $name - * @param mixed $parameters - * @return mixed + * @param string $name + * @param mixed $parameters + * @return mixed */ public function get($name, $parameters = null) {} @@ -156,93 +166,96 @@ public function get($name, $parameters = null) {} * Resolves a service, the resolved service is stored in the DI, subsequent * requests for this service will return the same instance * - * @param string $name - * @param array $parameters - * @return mixed + * + * @param string $name + * @param array $parameters + * @return mixed */ public function getShared($name, $parameters = null) {} /** * Check whether the DI contains a service by a name * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function has($name) {} /** * Check whether the last service obtained via getShared produced a fresh instance or an existing one * - * @return bool + * @return bool */ public function wasFreshInstance() {} /** * Return the services registered in the DI * - * @return Service[] + * @return \Phalcon\Di\Service[] */ public function getServices() {} /** * Check if a service is registered using the array syntax * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function offsetExists($name) {} /** * Allows to register a shared service using the array syntax + * * * $di["request"] = new \Phalcon\Http\Request(); * * - * @param string $name - * @param mixed $definition - * @return bool + * @param string $name + * @param mixed $definition + * @return bool */ public function offsetSet($name, $definition) {} /** * Allows to obtain a shared service using the array syntax + * * * var_dump($di["request"]); * * - * @param string $name - * @return mixed + * @param string $name + * @return mixed */ public function offsetGet($name) {} /** * Removes a service from the services container using the array syntax * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function offsetUnset($name) {} /** * Magic method to get or set services using setters/getters * - * @param string $method - * @param mixed $arguments - * @return mixed|null + * @param string $method + * @param mixed $arguments + * @return mixed|null */ public function __call($method, $arguments = null) {} /** * Set a default dependency injection container to be obtained into static methods * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public static function setDefault(\Phalcon\DiInterface $dependencyInjector) {} /** * Return the latest DI created * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public static function getDefault() {} diff --git a/ide/stubs/Phalcon/DiInterface.php b/ide/stubs/Phalcon/DiInterface.php index 53e5de99d..8d46d638d 100644 --- a/ide/stubs/Phalcon/DiInterface.php +++ b/ide/stubs/Phalcon/DiInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\DiInterface + * * Interface for Phalcon\Di */ interface DiInterface extends \ArrayAccess @@ -12,26 +13,28 @@ interface DiInterface extends \ArrayAccess /** * Registers a service in the services container * - * @param string $name - * @param mixed $definition - * @param boolean $shared - * @return \Phalcon\Di\ServiceInterface + * + * @param string $name + * @param mixed $definition + * @param boolean $shared + * @return \Phalcon\Di\ServiceInterface */ public function set($name, $definition, $shared = false); /** * Registers an "always shared" service in the services container * - * @param string $name - * @param mixed $definition - * @return \Phalcon\Di\ServiceInterface + * + * @param string $name + * @param mixed $definition + * @return \Phalcon\Di\ServiceInterface */ public function setShared($name, $definition); /** * Removes a service in the services container * - * @param string $name + * @param string $name */ public function remove($name); @@ -40,89 +43,94 @@ public function remove($name); * Only is successful if a service hasn't been registered previously * with the same name * - * @param string $name - * @param mixed $definition - * @param boolean $shared - * @return \Phalcon\Di\ServiceInterface + * + * @param string $name + * @param mixed $definition + * @param boolean $shared + * @return \Phalcon\Di\ServiceInterface */ public function attempt($name, $definition, $shared = false); /** * Resolves the service based on its configuration * - * @param string $name - * @param array $parameters - * @return mixed + * + * @param string $name + * @param array $parameters + * @return mixed */ public function get($name, $parameters = null); /** * Returns a shared service based on their configuration * - * @param string $name - * @param array $parameters - * @return mixed + * + * @param string $name + * @param array $parameters + * @return mixed */ public function getShared($name, $parameters = null); /** * Sets a service using a raw Phalcon\Di\Service definition * - * @param string $name - * @param mixed $rawDefinition - * @return \Phalcon\Di\ServiceInterface + * @param string $name + * @param \Phalcon\Di\ServiceInterface $rawDefinition + * @return \Phalcon\Di\ServiceInterface */ public function setRaw($name, \Phalcon\Di\ServiceInterface $rawDefinition); /** * Returns a service definition without resolving * - * @param string $name - * @return mixed + * + * @param string $name + * @return mixed */ public function getRaw($name); /** * Returns the corresponding Phalcon\Di\Service instance for a service * - * @param string $name - * @return \Phalcon\Di\ServiceInterface + * @param string $name + * @return \Phalcon\Di\ServiceInterface */ public function getService($name); /** * Check whether the DI contains a service by a name * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function has($name); /** * Check whether the last service obtained via getShared produced a fresh instance or an existing one * - * @return bool + * @return bool */ public function wasFreshInstance(); /** * Return the services registered in the DI * - * @return \Phalcon\Di\ServiceInterface[] + * + * @return \Phalcon\Di\ServiceInterface[] */ public function getServices(); /** * Set a default dependency injection container to be obtained into static methods * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public static function setDefault(\Phalcon\DiInterface $dependencyInjector); /** * Return the last DI created * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public static function getDefault(); diff --git a/ide/stubs/Phalcon/Dispatcher.php b/ide/stubs/Phalcon/Dispatcher.php index f2cf20d21..7d918c042 100644 --- a/ide/stubs/Phalcon/Dispatcher.php +++ b/ide/stubs/Phalcon/Dispatcher.php @@ -4,6 +4,7 @@ /** * Phalcon\Dispatcher + * * This is the base class for Phalcon\Mvc\Dispatcher and Phalcon\Cli\Dispatcher. * This class can't be instantiated directly, you can use it to create your own dispatchers. */ @@ -94,231 +95,242 @@ abstract class Dispatcher implements \Phalcon\DispatcherInterface, \Phalcon\Di\I /** * Sets the dependency injector * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the internal dependency injector * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI() {} /** * Sets the events manager * - * @param mixed $eventsManager + * @param \Phalcon\Events\ManagerInterface $eventsManager */ public function setEventsManager(\Phalcon\Events\ManagerInterface $eventsManager) {} /** * Returns the internal event manager * - * @return \Phalcon\Events\ManagerInterface + * @return \Phalcon\Events\ManagerInterface */ public function getEventsManager() {} /** * Sets the default action suffix * - * @param string $actionSuffix + * @param string $actionSuffix */ public function setActionSuffix($actionSuffix) {} /** * Gets the default action suffix * - * @return string + * @return string */ public function getActionSuffix() {} /** * Sets the module where the controller is (only informative) * - * @param string $moduleName + * @param string $moduleName */ public function setModuleName($moduleName) {} /** * Gets the module where the controller class is * - * @return string + * @return string */ public function getModuleName() {} /** * Sets the namespace where the controller class is * - * @param string $namespaceName + * @param string $namespaceName */ public function setNamespaceName($namespaceName) {} /** * Gets a namespace to be prepended to the current handler name * - * @return string + * @return string */ public function getNamespaceName() {} /** * Sets the default namespace * - * @param string $namespaceName + * @param string $namespaceName */ public function setDefaultNamespace($namespaceName) {} /** * Returns the default namespace * - * @return string + * @return string */ public function getDefaultNamespace() {} /** * Sets the default action name * - * @param string $actionName + * @param string $actionName */ public function setDefaultAction($actionName) {} /** * Sets the action name to be dispatched * - * @param string $actionName + * @param string $actionName */ public function setActionName($actionName) {} /** * Gets the latest dispatched action name * - * @return string + * @return string */ public function getActionName() {} /** * Sets action params to be dispatched * - * @param array $params + * + * @param array $params */ public function setParams($params) {} /** * Gets action params * - * @return array + * @return array */ public function getParams() {} /** * Set a param by its name or numeric index * - * @param mixed $param - * @param mixed $value + * + * @param mixed $param + * @param mixed $value */ public function setParam($param, $value) {} /** * Gets a param by its name or numeric index * - * @param mixed $param - * @param string|array $filters - * @param mixed $defaultValue - * @return mixed + * + * @param mixed $param + * @param string|array $filters + * @param mixed $defaultValue + * @return mixed */ public function getParam($param, $filters = null, $defaultValue = null) {} /** * Check if a param exists * - * @param mixed $param - * @return boolean + * + * @param mixed $param + * @return bool */ public function hasParam($param) {} /** * Returns the current method to be/executed in the dispatcher * - * @return string + * @return string */ public function getActiveMethod() {} /** * Checks if the dispatch loop is finished or has more pendent controllers/tasks to dispatch * - * @return bool + * @return bool */ public function isFinished() {} /** * Sets the latest returned value by an action manually * - * @param mixed $value + * + * @param mixed $value */ public function setReturnedValue($value) {} /** * Returns value returned by the latest dispatched action * - * @return mixed + * + * @return mixed */ public function getReturnedValue() {} /** * Enable/Disable model binding during dispatch * - * @param boolean $value + * + * @param boolean $value */ public function setModelBinding($value) {} /** * Dispatches a handle action taking into account the routing parameters * - * @return object + * + * @return object */ public function dispatch() {} /** * Dispatches a handle action taking into account the routing parameters * - * @return object + * + * @return object */ protected function _dispatch() {} /** * Forwards the execution flow to another controller/action * Dispatchers are unique per module. Forwarding between modules is not allowed + * * * $this->dispatcher->forward( - * [ - * "controller" => "posts", - * "action" => "index", - * ] + * [ + * "controller" => "posts", + * "action" => "index", + * ] * ); * * - * @param array $forward + * + * @param array $forward */ public function forward($forward) {} /** * Check if the current executed action was forwarded by another one * - * @return bool + * @return bool */ public function wasForwarded() {} /** * Possible class name that will be located to dispatch the request * - * @return string + * @return string */ public function getHandlerClass() {} /** - * @param mixed $handler - * @param string $actionMethod - * @param array $params + * @param mixed $handler + * @param string $actionMethod + * @param array $params */ public function callActionMethod($handler, $actionMethod, array $params = array()) {} diff --git a/ide/stubs/Phalcon/DispatcherInterface.php b/ide/stubs/Phalcon/DispatcherInterface.php index a2216683b..0f50be706 100644 --- a/ide/stubs/Phalcon/DispatcherInterface.php +++ b/ide/stubs/Phalcon/DispatcherInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\DispatcherInterface + * * Interface for Phalcon\Dispatcher */ interface DispatcherInterface @@ -12,123 +13,130 @@ interface DispatcherInterface /** * Sets the default action suffix * - * @param string $actionSuffix + * @param string $actionSuffix */ public function setActionSuffix($actionSuffix); /** * Gets the default action suffix * - * @return string + * @return string */ public function getActionSuffix(); /** * Sets the default namespace * - * @param string $defaultNamespace + * @param string $defaultNamespace */ public function setDefaultNamespace($defaultNamespace); /** * Sets the default action name * - * @param string $actionName + * @param string $actionName */ public function setDefaultAction($actionName); /** * Sets the namespace which the controller belongs to * - * @param string $namespaceName + * @param string $namespaceName */ public function setNamespaceName($namespaceName); /** * Sets the module name which the application belongs to * - * @param string $moduleName + * @param string $moduleName */ public function setModuleName($moduleName); /** * Sets the action name to be dispatched * - * @param string $actionName + * @param string $actionName */ public function setActionName($actionName); /** * Gets last dispatched action name * - * @return string + * @return string */ public function getActionName(); /** * Sets action params to be dispatched * - * @param array $params + * + * @param array $params */ public function setParams($params); /** * Gets action params * - * @return array + * @return array */ public function getParams(); /** * Set a param by its name or numeric index * - * @param mixed $param - * @param mixed $value + * + * @param mixed $param + * @param mixed $value */ public function setParam($param, $value); /** * Gets a param by its name or numeric index * - * @param mixed $param - * @param string|array $filters - * @return mixed + * + * @param mixed $param + * @param string|array $filters + * @return mixed */ public function getParam($param, $filters = null); /** * Check if a param exists * - * @param mixed $param - * @return boolean + * + * @param mixed $param + * @return bool */ public function hasParam($param); /** * Checks if the dispatch loop is finished or has more pendent controllers/tasks to dispatch * - * @return bool + * @return bool */ public function isFinished(); /** * Returns value returned by the latest dispatched action * - * @return mixed + * + * @return mixed */ public function getReturnedValue(); /** * Dispatches a handle action taking into account the routing parameters * - * @return object + * + * @return object */ public function dispatch(); /** * Forwards the execution flow to another controller/action * - * @param array $forward + * + * @param array $forward */ public function forward($forward); diff --git a/ide/stubs/Phalcon/Escaper.php b/ide/stubs/Phalcon/Escaper.php index f9529ceb8..9ee1b8011 100644 --- a/ide/stubs/Phalcon/Escaper.php +++ b/ide/stubs/Phalcon/Escaper.php @@ -4,12 +4,17 @@ /** * Phalcon\Escaper + * * Escapes different kinds of text securing them. By using this component you may * prevent XSS attacks. + * * This component only works with UTF-8. The PREG extension needs to be compiled with UTF-8 support. + * * * $escaper = new \Phalcon\Escaper(); + * * $escaped = $escaper->escapeCss("font-family: "); + * * echo $escaped; // font\2D family\3A \20 \3C Verdana\3E * */ @@ -30,38 +35,41 @@ class Escaper implements \Phalcon\EscaperInterface /** * Sets the encoding to be used by the escaper + * * * $escaper->setEncoding("utf-8"); * * - * @param string $encoding + * @param string $encoding */ public function setEncoding($encoding) {} /** * Returns the internal encoding used by the escaper * - * @return string + * @return string */ public function getEncoding() {} /** * Sets the HTML quoting type for htmlspecialchars + * * * $escaper->setHtmlQuoteType(ENT_XHTML); * * - * @param int $quoteType + * @param int $quoteType */ public function setHtmlQuoteType($quoteType) {} /** * Sets the double_encode to be used by the escaper + * * * $escaper->setDoubleEncode(false); * * - * @param bool $doubleEncode + * @param bool $doubleEncode */ public function setDoubleEncode($doubleEncode) {} @@ -69,56 +77,56 @@ public function setDoubleEncode($doubleEncode) {} * Detect the character encoding of a string to be handled by an encoder * Special-handling for chr(172) and chr(128) to chr(159) which fail to be detected by mb_detect_encoding() * - * @param string $str - * @return string|null + * @param string $str + * @return string|null */ public final function detectEncoding($str) {} /** * Utility to normalize a string's encoding to UTF-32. * - * @param string $str - * @return string + * @param string $str + * @return string */ public final function normalizeEncoding($str) {} /** * Escapes a HTML string. Internally uses htmlspecialchars * - * @param string $text - * @return string + * @param string $text + * @return string */ public function escapeHtml($text) {} /** * Escapes a HTML attribute string * - * @param string $attribute - * @return string + * @param string $attribute + * @return string */ public function escapeHtmlAttr($attribute) {} /** * Escape CSS strings by replacing non-alphanumeric chars by their hexadecimal escaped representation * - * @param string $css - * @return string + * @param string $css + * @return string */ public function escapeCss($css) {} /** * Escape javascript strings by replacing non-alphanumeric chars by their hexadecimal escaped representation * - * @param string $js - * @return string + * @param string $js + * @return string */ public function escapeJs($js) {} /** * Escapes a URL. Internally uses rawurlencode * - * @param string $url - * @return string + * @param string $url + * @return string */ public function escapeUrl($url) {} diff --git a/ide/stubs/Phalcon/EscaperInterface.php b/ide/stubs/Phalcon/EscaperInterface.php index e8718dea2..ce2d6b669 100644 --- a/ide/stubs/Phalcon/EscaperInterface.php +++ b/ide/stubs/Phalcon/EscaperInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\EscaperInterface + * * Interface for Phalcon\Escaper */ interface EscaperInterface @@ -12,61 +13,69 @@ interface EscaperInterface /** * Sets the encoding to be used by the escaper * - * @param string $encoding + * + * @param string $encoding */ public function setEncoding($encoding); /** * Returns the internal encoding used by the escaper * - * @return string + * + * @return string */ public function getEncoding(); /** * Sets the HTML quoting type for htmlspecialchars * - * @param int $quoteType + * + * @param int $quoteType */ public function setHtmlQuoteType($quoteType); /** * Escapes a HTML string * - * @param string $text - * @return string + * + * @param string $text + * @return string */ public function escapeHtml($text); /** * Escapes a HTML attribute string * - * @param string $text - * @return string + * + * @param string $text + * @return string */ public function escapeHtmlAttr($text); /** * Escape CSS strings by replacing non-alphanumeric chars by their hexadecimal representation * - * @param string $css - * @return string + * + * @param string $css + * @return string */ public function escapeCss($css); /** * Escape Javascript strings by replacing non-alphanumeric chars by their hexadecimal representation * - * @param string $js - * @return string + * + * @param string $js + * @return string */ public function escapeJs($js); /** * Escapes a URL. Internally uses rawurlencode * - * @param string $url - * @return string + * + * @param string $url + * @return string */ public function escapeUrl($url); diff --git a/ide/stubs/Phalcon/Exception.php b/ide/stubs/Phalcon/Exception.php index 9069b18f0..95f9e0545 100644 --- a/ide/stubs/Phalcon/Exception.php +++ b/ide/stubs/Phalcon/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Exception + * * All framework exceptions should use or extend this exception */ class Exception extends \Exception diff --git a/ide/stubs/Phalcon/Filter.php b/ide/stubs/Phalcon/Filter.php index 0eeaa6c43..6697e47c1 100644 --- a/ide/stubs/Phalcon/Filter.php +++ b/ide/stubs/Phalcon/Filter.php @@ -4,11 +4,14 @@ /** * Phalcon\Filter + * * The Phalcon\Filter component provides a set of commonly needed data filters. It provides * object oriented wrappers to the php filter extension. Also allows the developer to * define his/her own filters + * * * $filter = new \Phalcon\Filter(); + * * $filter->sanitize("some(one)@exa\\mple.com", "email"); // returns "someone@example.com" * $filter->sanitize("hello<<", "string"); // returns "hello" * $filter->sanitize("!100a019", "int"); // returns "100019" @@ -60,34 +63,34 @@ class Filter implements \Phalcon\FilterInterface /** * Adds a user-defined filter * - * @param string $name - * @param mixed $handler - * @return Filter + * @param string $name + * @param mixed $handler + * @return Filter */ public function add($name, $handler) {} /** * Sanitizes a value with a specified single or set of filters * - * @param mixed $value - * @param mixed $filters - * @param bool $noRecursive - * @return mixed + * @param mixed $value + * @param mixed $filters + * @param bool $noRecursive + * @return mixed */ public function sanitize($value, $filters, $noRecursive = false) {} /** * Internal sanitize wrapper to filter_var * - * @param mixed $value - * @param string $filter + * @param mixed $value + * @param string $filter */ protected function _sanitize($value, $filter) {} /** * Return the user-defined filters in the instance * - * @return array + * @return array */ public function getFilters() {} diff --git a/ide/stubs/Phalcon/FilterInterface.php b/ide/stubs/Phalcon/FilterInterface.php index 459b8b42b..6ffc77e20 100644 --- a/ide/stubs/Phalcon/FilterInterface.php +++ b/ide/stubs/Phalcon/FilterInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\FilterInterface + * * Interface for Phalcon\Filter */ interface FilterInterface @@ -12,25 +13,25 @@ interface FilterInterface /** * Adds a user-defined filter * - * @param string $name - * @param mixed $handler - * @return FilterInterface + * @param string $name + * @param mixed $handler + * @return FilterInterface */ public function add($name, $handler); /** * Sanizites a value with a specified single or set of filters * - * @param mixed $value - * @param mixed $filters - * @return mixed + * @param mixed $value + * @param mixed $filters + * @return mixed */ public function sanitize($value, $filters); /** * Return the user-defined filters in the instance * - * @return array + * @return array */ public function getFilters(); diff --git a/ide/stubs/Phalcon/Flash.php b/ide/stubs/Phalcon/Flash.php index 0eb4ccfe6..8b56e054c 100644 --- a/ide/stubs/Phalcon/Flash.php +++ b/ide/stubs/Phalcon/Flash.php @@ -4,7 +4,9 @@ /** * Phalcon\Flash + * * Shows HTML notifications related to different circumstances. Classes can be stylized using CSS + * * * $flash->success("The record was successfully deleted"); * $flash->error("Cannot open the file"); @@ -37,132 +39,138 @@ abstract class Flash implements \Phalcon\FlashInterface, \Phalcon\Di\InjectionAw /** * Phalcon\Flash constructor * - * @param mixed $cssClasses + * @param mixed $cssClasses */ public function __construct($cssClasses = null) {} /** * Returns the autoescape mode in generated html * - * @return bool + * @return bool */ public function getAutoescape() {} /** * Set the autoescape mode in generated html * - * @param bool $autoescape - * @return Flash + * @param bool $autoescape + * @return Flash */ public function setAutoescape($autoescape) {} /** * Returns the Escaper Service * - * @return EscaperInterface + * @return EscaperInterface */ public function getEscaperService() {} /** * Sets the Escaper Service * - * @param mixed $escaperService - * @return Flash + * @param EscaperInterface $escaperService + * @return Flash */ public function setEscaperService(EscaperInterface $escaperService) {} /** * Sets the dependency injector * - * @param mixed $dependencyInjector - * @return Flash + * @param DiInterface $dependencyInjector + * @return Flash */ public function setDI(DiInterface $dependencyInjector) {} /** * Returns the internal dependency injector * - * @return DiInterface + * @return DiInterface */ public function getDI() {} /** * Set whether the output must be implicitly flushed to the output or returned as string * - * @param bool $implicitFlush - * @return FlashInterface + * @param bool $implicitFlush + * @return FlashInterface */ public function setImplicitFlush($implicitFlush) {} /** * Set if the output must be implicitly formatted with HTML * - * @param bool $automaticHtml - * @return FlashInterface + * @param bool $automaticHtml + * @return FlashInterface */ public function setAutomaticHtml($automaticHtml) {} /** * Set an array with CSS classes to format the messages * - * @param array $cssClasses - * @return FlashInterface + * @param array $cssClasses + * @return FlashInterface */ public function setCssClasses(array $cssClasses) {} /** * Shows a HTML error message + * * * $flash->error("This is an error"); * * - * @param mixed $message - * @return string + * @param mixed $message + * @return string */ public function error($message) {} /** * Shows a HTML notice/information message + * * * $flash->notice("This is an information"); * * - * @param mixed $message - * @return string + * @param mixed $message + * @return string */ public function notice($message) {} /** * Shows a HTML success message + * * * $flash->success("The process was finished successfully"); * * - * @param mixed $message - * @return string + * @param mixed $message + * @return string */ public function success($message) {} /** * Shows a HTML warning message + * * * $flash->warning("Hey, this is important"); * * - * @param mixed $message - * @return string + * @param mixed $message + * @return string */ public function warning($message) {} /** * Outputs a message formatting it with HTML + * * * $flash->outputMessage("error", $message); * * - * @param string $type - * @param string|array $message - * @return string|void + * + * @param string $type + * @param string|array $message + * @return string|void */ public function outputMessage($type, $message) {} diff --git a/ide/stubs/Phalcon/FlashInterface.php b/ide/stubs/Phalcon/FlashInterface.php index 86ca19753..7053c80a7 100644 --- a/ide/stubs/Phalcon/FlashInterface.php +++ b/ide/stubs/Phalcon/FlashInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\FlashInterface + * * Interface for Phalcon\Flash */ interface FlashInterface @@ -12,36 +13,36 @@ interface FlashInterface /** * Shows a HTML error message * - * @param mixed $message + * @param mixed $message */ public function error($message); /** * Shows a HTML notice/information message * - * @param mixed $message + * @param mixed $message */ public function notice($message); /** * Shows a HTML success message * - * @param mixed $message + * @param mixed $message */ public function success($message); /** * Shows a HTML warning message * - * @param mixed $message + * @param mixed $message */ public function warning($message); /** * Outputs a message * - * @param string $type - * @param mixed $message + * @param string $type + * @param mixed $message */ public function message($type, $message); diff --git a/ide/stubs/Phalcon/Kernel.php b/ide/stubs/Phalcon/Kernel.php index c67e807e4..8d55e1566 100644 --- a/ide/stubs/Phalcon/Kernel.php +++ b/ide/stubs/Phalcon/Kernel.php @@ -4,6 +4,7 @@ /** * Phalcon\Kernel + * * This class allows to change the internal behavior of the framework in runtime */ class Kernel @@ -13,8 +14,9 @@ class Kernel * Produces a pre-computed hash key based on a string. This function * produces different numbers in 32bit/64bit processors * - * @param string $key - * @return string + * + * @param string $key + * @return string */ public static function preComputeHashKey($key) {} diff --git a/ide/stubs/Phalcon/Loader.php b/ide/stubs/Phalcon/Loader.php index f4e7a981d..9e751c575 100644 --- a/ide/stubs/Phalcon/Loader.php +++ b/ide/stubs/Phalcon/Loader.php @@ -4,21 +4,27 @@ /** * Phalcon\Loader + * * This component helps to load your project classes automatically based on some conventions + * * * use Phalcon\Loader; + * * // Creates the autoloader * $loader = new Loader(); + * * // Register some namespaces * $loader->registerNamespaces( - * [ - * "Example\\Base" => "vendor/example/base/", - * "Example\\Adapter" => "vendor/example/adapter/", - * "Example" => "vendor/example/", - * ] + * [ + * "Example\\Base" => "vendor/example/base/", + * "Example\\Adapter" => "vendor/example/adapter/", + * "Example" => "vendor/example/", + * ] * ); + * * // Register autoloader * $loader->register(); + * * // Requiring this class will automatically include file vendor/example/adapter/Some.php * $adapter = new \Example\Adapter\Some(); * @@ -56,67 +62,67 @@ class Loader implements \Phalcon\Events\EventsAwareInterface /** * Sets the events manager * - * @param mixed $eventsManager + * @param \Phalcon\Events\ManagerInterface $eventsManager */ public function setEventsManager(\Phalcon\Events\ManagerInterface $eventsManager) {} /** * Returns the internal event manager * - * @return \Phalcon\Events\ManagerInterface + * @return \Phalcon\Events\ManagerInterface */ public function getEventsManager() {} /** * Sets an array of file extensions that the loader must try in each attempt to locate the file * - * @param array $extensions - * @return Loader + * @param array $extensions + * @return Loader */ public function setExtensions(array $extensions) {} /** * Returns the file extensions registered in the loader * - * @return array + * @return array */ public function getExtensions() {} /** * Register namespaces and their related directories * - * @param array $namespaces - * @param bool $merge - * @return Loader + * @param array $namespaces + * @param bool $merge + * @return Loader */ public function registerNamespaces(array $namespaces, $merge = false) {} /** - * @param array $namespace - * @return array + * @param array $namespace + * @return array */ protected function prepareNamespace(array $namespace) {} /** * Returns the namespaces currently registered in the autoloader * - * @return array + * @return array */ public function getNamespaces() {} /** * Register directories in which "not found" classes could be found * - * @param array $directories - * @param bool $merge - * @return Loader + * @param array $directories + * @param bool $merge + * @return Loader */ public function registerDirs(array $directories, $merge = false) {} /** * Returns the directories currently registered in the autoloader * - * @return array + * @return array */ public function getDirs() {} @@ -124,46 +130,46 @@ public function getDirs() {} * Registers files that are "non-classes" hence need a "require". This is very useful for including files that only * have functions * - * @param array $files - * @param bool $merge - * @return Loader + * @param array $files + * @param bool $merge + * @return Loader */ public function registerFiles(array $files, $merge = false) {} /** * Returns the files currently registered in the autoloader * - * @return array + * @return array */ public function getFiles() {} /** * Register classes and their locations * - * @param array $classes - * @param bool $merge - * @return Loader + * @param array $classes + * @param bool $merge + * @return Loader */ public function registerClasses(array $classes, $merge = false) {} /** * Returns the class-map currently registered in the autoloader * - * @return array + * @return array */ public function getClasses() {} /** * Register the autoload method * - * @return Loader + * @return Loader */ public function register() {} /** * Unregister the autoload method * - * @return Loader + * @return Loader */ public function unregister() {} @@ -175,22 +181,22 @@ public function loadFiles() {} /** * Autoloads the registered classes * - * @param string $className - * @return bool + * @param string $className + * @return bool */ public function autoLoad($className) {} /** * Get the path when a class was found * - * @return string + * @return string */ public function getFoundPath() {} /** * Get the path the loader is checking for a path * - * @return string + * @return string */ public function getCheckedPath() {} diff --git a/ide/stubs/Phalcon/Logger.php b/ide/stubs/Phalcon/Logger.php index e3cb602a6..332e012ac 100644 --- a/ide/stubs/Phalcon/Logger.php +++ b/ide/stubs/Phalcon/Logger.php @@ -4,9 +4,11 @@ /** * Phalcon\Logger + * * Phalcon\Logger is a component whose purpose is create logs using * different backends via adapters, generating options, formats and filters * also implementing transactions. + * * * $logger = new \Phalcon\Logger\Adapter\File("app/logs/test.log"); * $logger->log("This is a message"); diff --git a/ide/stubs/Phalcon/Registry.php b/ide/stubs/Phalcon/Registry.php index 478b5b691..7ee3d07cd 100644 --- a/ide/stubs/Phalcon/Registry.php +++ b/ide/stubs/Phalcon/Registry.php @@ -4,40 +4,50 @@ /** * Phalcon\Registry + * * A registry is a container for storing objects and values in the application space. * By storing the value in a registry, the same object is always available throughout * your application. + * * * $registry = new \Phalcon\Registry(); + * * // Set value * $registry->something = "something"; * // or * $registry["something"] = "something"; + * * // Get value * $value = $registry->something; * // or * $value = $registry["something"]; + * * // Check if the key exists * $exists = isset($registry->something); * // or * $exists = isset($registry["something"]); + * * // Unset * unset($registry->something); * // or * unset($registry["something"]); * + * * In addition to ArrayAccess, Phalcon\Registry also implements Countable * (count($registry) will return the number of elements in the registry), * Serializable and Iterator (you can iterate over the registry * using a foreach loop) interfaces. For PHP 5.4 and higher, JsonSerializable * interface is implemented. + * * Phalcon\Registry is very fast (it is typically faster than any userspace * implementation of the registry); however, this comes at a price: * Phalcon\Registry is a final class and cannot be inherited from. + * * Though Phalcon\Registry exposes methods like __get(), offsetGet(), count() etc, * it is not recommended to invoke them manually (these methods exist mainly to * match the interfaces the registry implements): $registry->__get("property") * is several times slower than $registry->property. + * * Internally all the magic methods (and interfaces except JsonSerializable) * are implemented using object handlers or similar techniques: this allows * to bypass relatively slow method calls. @@ -56,38 +66,38 @@ public final function __construct() {} /** * Checks if the element is present in the registry * - * @param string $offset - * @return bool + * @param string $offset + * @return bool */ public final function offsetExists($offset) {} /** * Returns an index in the registry * - * @param string $offset - * @return mixed + * @param string $offset + * @return mixed */ public final function offsetGet($offset) {} /** * Sets an element in the registry * - * @param string $offset - * @param mixed $value + * @param string $offset + * @param mixed $value */ public final function offsetSet($offset, $value) {} /** * Unsets an element in the registry * - * @param string $offset + * @param string $offset */ public final function offsetUnset($offset) {} /** * Checks how many elements are in the register * - * @return int + * @return int */ public final function count() {} @@ -99,7 +109,7 @@ public final function next() {} /** * Gets pointer number of active row in the registry * - * @return int + * @return int */ public final function key() {} @@ -111,7 +121,7 @@ public final function rewind() {} /** * Checks if the iterator is valid * - * @return bool + * @return bool */ public function valid() {} @@ -123,27 +133,27 @@ public function current() {} /** * Sets an element in the registry * - * @param string $key - * @param mixed $value + * @param string $key + * @param mixed $value */ public final function __set($key, $value) {} /** * Returns an index in the registry * - * @param string $key - * @return mixed + * @param string $key + * @return mixed */ public final function __get($key) {} /** - * @param string $key - * @return bool + * @param string $key + * @return bool */ public final function __isset($key) {} /** - * @param string $key + * @param string $key */ public final function __unset($key) {} diff --git a/ide/stubs/Phalcon/Security.php b/ide/stubs/Phalcon/Security.php index 1ed40c839..cb9ac7e75 100644 --- a/ide/stubs/Phalcon/Security.php +++ b/ide/stubs/Phalcon/Security.php @@ -4,15 +4,19 @@ /** * Phalcon\Security + * * This component provides a set of functions to improve the security in Phalcon applications + * * * $login = $this->request->getPost("login"); * $password = $this->request->getPost("password"); + * * $user = Users::findFirstByLogin($login); + * * if ($user) { - * if ($this->security->checkHash($password, $user->password)) { - * // The password is valid - * } + * if ($this->security->checkHash($password, $user->password)) { + * // The password is valid + * } * } * */ @@ -77,7 +81,7 @@ class Security implements \Phalcon\Di\InjectionAwareInterface /** - * @param mixed $workFactor + * @param mixed $workFactor */ public function setWorkFactor($workFactor) {} @@ -92,156 +96,158 @@ public function __construct() {} /** * Sets the dependency injector * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the internal dependency injector * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI() {} /** * Sets a number of bytes to be generated by the openssl pseudo random generator * - * @param long $randomBytes - * @return Security + * @param long $randomBytes + * @return Security */ public function setRandomBytes($randomBytes) {} /** * Returns a number of bytes to be generated by the openssl pseudo random generator * - * @return string + * @return string */ public function getRandomBytes() {} /** * Returns a secure random number generator instance * - * @return \Phalcon\Security\Random + * @return \Phalcon\Security\Random */ public function getRandom() {} /** * Generate a >22-length pseudo random string to be used as salt for passwords * - * @param int $numberBytes - * @return string + * @param int $numberBytes + * @return string */ public function getSaltBytes($numberBytes = 0) {} /** * Creates a password hash using bcrypt with a pseudo random salt * - * @param string $password - * @param int $workFactor - * @return string + * @param string $password + * @param int $workFactor + * @return string */ public function hash($password, $workFactor = 0) {} /** * Checks a plain text password and its hash version to check if the password matches * - * @param string $password - * @param string $passwordHash - * @param int $maxPassLength - * @return bool + * @param string $password + * @param string $passwordHash + * @param int $maxPassLength + * @return bool */ public function checkHash($password, $passwordHash, $maxPassLength = 0) {} /** * Checks if a password hash is a valid bcrypt's hash * - * @param string $passwordHash - * @return bool + * @param string $passwordHash + * @return bool */ public function isLegacyHash($passwordHash) {} /** * Generates a pseudo random token key to be used as input's name in a CSRF check * - * @return string + * @return string */ public function getTokenKey() {} /** * Generates a pseudo random token value to be used as input's value in a CSRF check * - * @return string + * @return string */ public function getToken() {} /** * Check if the CSRF token sent in the request is the same that the current in session * - * @param mixed $tokenKey - * @param mixed $tokenValue - * @param bool $destroyIfValid - * @return bool + * @param mixed $tokenKey + * @param mixed $tokenValue + * @param bool $destroyIfValid + * @return bool */ public function checkToken($tokenKey = null, $tokenValue = null, $destroyIfValid = true) {} /** * Returns the value of the CSRF token in session * - * @return string + * @return string */ public function getSessionToken() {} /** * Removes the value of the CSRF token and key from session * - * @return Security + * @return Security */ public function destroyToken() {} /** * Computes a HMAC * - * @param string $data - * @param string $key - * @param string $algo - * @param bool $raw - * @return string + * @param string $data + * @param string $key + * @param string $algo + * @param bool $raw + * @return string */ public function computeHmac($data, $key, $algo, $raw = false) {} /** * Sets the default hash * - * @param int $defaultHash - * @return Security + * @param int $defaultHash + * @return Security */ public function setDefaultHash($defaultHash) {} /** * Returns the default hash * - * @return int|null + * @return int|null */ public function getDefaultHash() {} /** * Testing for LibreSSL * - * @return bool + * @return bool */ public function hasLibreSsl() {} /** * Getting OpenSSL or LibreSSL version + * * Parse OPENSSL_VERSION_TEXT because OPENSSL_VERSION_NUMBER is no use for LibreSSL. * * @link https://bugs.php.net/bug.php?id=71143 + * * * if ($security->getSslVersionNumber() >= 20105) { - * // ... + * // ... * } * - * @return int + * @return int */ public function getSslVersionNumber() {} diff --git a/ide/stubs/Phalcon/Tag.php b/ide/stubs/Phalcon/Tag.php index 26174df48..4d2bcb75a 100644 --- a/ide/stubs/Phalcon/Tag.php +++ b/ide/stubs/Phalcon/Tag.php @@ -4,6 +4,7 @@ /** * Phalcon\Tag + * * Phalcon\Tag is designed to simplify building of HTML tags. * It provides a set of helpers to generate HTML in a dynamic way. * This component is an abstract class that you can extend to add more helpers. @@ -86,100 +87,108 @@ class Tag /** * Obtains the 'escaper' service if required * - * @param array $params - * @return EscaperInterface + * + * @param array $params + * @return EscaperInterface */ public static function getEscaper(array $params) {} /** * Renders parameters keeping order in their HTML attributes * - * @param string $code - * @param array $attributes - * @return string + * @param string $code + * @param array $attributes + * @return string */ public static function renderAttributes($code, array $attributes) {} /** * Sets the dependency injector container. * - * @param mixed $dependencyInjector + * @param DiInterface $dependencyInjector */ public static function setDI(DiInterface $dependencyInjector) {} /** * Internally gets the request dispatcher * - * @return DiInterface + * @return DiInterface */ public static function getDI() {} /** * Returns a URL service from the default DI * - * @return \Phalcon\Mvc\UrlInterface + * @return \Phalcon\Mvc\UrlInterface */ public static function getUrlService() {} /** * Returns an Escaper service from the default DI * - * @return EscaperInterface + * @return EscaperInterface */ public static function getEscaperService() {} /** * Set autoescape mode in generated html * - * @param bool $autoescape + * @param bool $autoescape */ public static function setAutoescape($autoescape) {} /** * Assigns default values to generated tags by helpers + * * * // Assigning "peter" to "name" component * Phalcon\Tag::setDefault("name", "peter"); + * * // Later in the view * echo Phalcon\Tag::textField("name"); // Will have the value "peter" by default * * - * @param string $id - * @param string $value + * + * @param string $id + * @param string $value */ public static function setDefault($id, $value) {} /** * Assigns default values to generated tags by helpers + * * * // Assigning "peter" to "name" component * Phalcon\Tag::setDefaults( - * [ - * "name" => "peter", - * ] + * [ + * "name" => "peter", + * ] * ); + * * // Later in the view * echo Phalcon\Tag::textField("name"); // Will have the value "peter" by default * * - * @param array $values - * @param bool $merge + * @param array $values + * @param bool $merge */ public static function setDefaults(array $values, $merge = false) {} /** * Alias of Phalcon\Tag::setDefault * - * @param string $id - * @param string $value + * + * @param string $id + * @param string $value */ public static function displayTo($id, $value) {} /** * Check if a helper has a default value set using Phalcon\Tag::setDefault or value from $_POST * - * @param string $name - * @return boolean + * + * @param string $name + * @return bool */ public static function hasValue($name) {} @@ -187,9 +196,10 @@ public static function hasValue($name) {} * Every helper calls this function to check whether a component has a predefined * value using Phalcon\Tag::setDefault or value from $_POST * - * @param string $name - * @param array $params - * @return mixed + * + * @param string $name + * @param array $params + * @return mixed */ public static function getValue($name, $params = null) {} @@ -202,528 +212,602 @@ public static function resetInput() {} /** * Builds a HTML A tag using framework conventions + * * * echo Phalcon\Tag::linkTo("signup/register", "Register Here!"); + * * echo Phalcon\Tag::linkTo( - * [ - * "signup/register", - * "Register Here!" - * ] + * [ + * "signup/register", + * "Register Here!" + * ] * ); + * * echo Phalcon\Tag::linkTo( - * [ - * "signup/register", - * "Register Here!", - * "class" => "btn-primary", - * ] + * [ + * "signup/register", + * "Register Here!", + * "class" => "btn-primary", + * ] * ); + * * echo Phalcon\Tag::linkTo("http://phalconphp.com/", "Phalcon", false); + * * echo Phalcon\Tag::linkTo( - * [ - * "http://phalconphp.com/", - * "Phalcon Home", - * false, - * ] + * [ + * "http://phalconphp.com/", + * "Phalcon Home", + * false, + * ] * ); + * * echo Phalcon\Tag::linkTo( - * [ - * "http://phalconphp.com/", - * "Phalcon Home", - * "local" => false, - * ] + * [ + * "http://phalconphp.com/", + * "Phalcon Home", + * "local" => false, + * ] * ); + * * echo Phalcon\Tag::linkTo( - * [ - * "action" => "http://phalconphp.com/", - * "text" => "Phalcon Home", - * "local" => false, - * "target" => "_new" - * ] + * [ + * "action" => "http://phalconphp.com/", + * "text" => "Phalcon Home", + * "local" => false, + * "target" => "_new" + * ] * ); + * * * - * @param array|string $parameters - * @param string $text - * @param boolean $local - * @return string + * + * @param array|string $parameters + * @param string $text + * @param boolean $local + * @return string */ public static function linkTo($parameters, $text = null, $local = true) {} /** * Builds generic INPUT tags * - * @param string $type - * @param array $parameters - * @param boolean $asValue - * @return string + * + * @param string $type + * @param array $parameters + * @param boolean $asValue + * @return string */ static protected final function _inputField($type, $parameters, $asValue = false) {} /** * Builds INPUT tags that implements the checked attribute * - * @param string $type - * @param array $parameters - * @return string + * + * @param string $type + * @param array $parameters + * @return string */ static protected final function _inputFieldChecked($type, $parameters) {} /** * Builds a HTML input[type="color"] tag * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function colorField($parameters) {} /** * Builds a HTML input[type="text"] tag + * * * echo Phalcon\Tag::textField( - * [ - * "name", - * "size" => 30, - * ] + * [ + * "name", + * "size" => 30, + * ] * ); * * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function textField($parameters) {} /** * Builds a HTML input[type="number"] tag + * * * echo Phalcon\Tag::numericField( - * [ - * "price", - * "min" => "1", - * "max" => "5", - * ] + * [ + * "price", + * "min" => "1", + * "max" => "5", + * ] * ); * * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function numericField($parameters) {} /** * Builds a HTML input[type="range"] tag * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function rangeField($parameters) {} /** * Builds a HTML input[type="email"] tag + * * * echo Phalcon\Tag::emailField("email"); * * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function emailField($parameters) {} /** * Builds a HTML input[type="date"] tag + * * * echo Phalcon\Tag::dateField( - * [ - * "born", - * "value" => "14-12-1980", - * ] + * [ + * "born", + * "value" => "14-12-1980", + * ] * ); * * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function dateField($parameters) {} /** * Builds a HTML input[type="datetime"] tag * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function dateTimeField($parameters) {} /** * Builds a HTML input[type="datetime-local"] tag * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function dateTimeLocalField($parameters) {} /** * Builds a HTML input[type="month"] tag * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function monthField($parameters) {} /** * Builds a HTML input[type="time"] tag * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function timeField($parameters) {} /** * Builds a HTML input[type="week"] tag * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function weekField($parameters) {} /** * Builds a HTML input[type="password"] tag + * * * echo Phalcon\Tag::passwordField( - * [ - * "name", - * "size" => 30, - * ] + * [ + * "name", + * "size" => 30, + * ] * ); * * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function passwordField($parameters) {} /** * Builds a HTML input[type="hidden"] tag + * * * echo Phalcon\Tag::hiddenField( - * [ - * "name", - * "value" => "mike", - * ] + * [ + * "name", + * "value" => "mike", + * ] * ); * * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function hiddenField($parameters) {} /** * Builds a HTML input[type="file"] tag + * * * echo Phalcon\Tag::fileField("file"); * * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function fileField($parameters) {} /** * Builds a HTML input[type="search"] tag * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function searchField($parameters) {} /** * Builds a HTML input[type="tel"] tag * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function telField($parameters) {} /** * Builds a HTML input[type="url"] tag * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function urlField($parameters) {} /** * Builds a HTML input[type="check"] tag + * * * echo Phalcon\Tag::checkField( - * [ - * "terms", - * "value" => "Y", - * ] + * [ + * "terms", + * "value" => "Y", + * ] * ); * + * * Volt syntax: * * {{ check_field("terms") }} * * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function checkField($parameters) {} /** * Builds a HTML input[type="radio"] tag + * * * echo Phalcon\Tag::radioField( - * [ - * "weather", - * "value" => "hot", - * ] + * [ + * "weather", + * "value" => "hot", + * ] * ); * + * * Volt syntax: * * {{ radio_field("Save") }} * * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function radioField($parameters) {} /** * Builds a HTML input[type="image"] tag + * * * echo Phalcon\Tag::imageInput( - * [ - * "src" => "/img/button.png", - * ] + * [ + * "src" => "/img/button.png", + * ] * ); * + * * Volt syntax: * * {{ image_input("src": "/img/button.png") }} * * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function imageInput($parameters) {} /** * Builds a HTML input[type="submit"] tag + * * * echo Phalcon\Tag::submitButton("Save") * + * * Volt syntax: * * {{ submit_button("Save") }} * * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function submitButton($parameters) {} /** * Builds a HTML SELECT tag using a PHP array for options + * * * echo Phalcon\Tag::selectStatic( - * "status", - * [ - * "A" => "Active", - * "I" => "Inactive", - * ] + * "status", + * [ + * "A" => "Active", + * "I" => "Inactive", + * ] * ); * * - * @param array $parameters - * @param array $data - * @return string + * + * @param array $parameters + * @param array $data + * @return string */ public static function selectStatic($parameters, $data = null) {} /** * Builds a HTML SELECT tag using a Phalcon\Mvc\Model resultset as options + * * * echo Phalcon\Tag::select( - * [ - * "robotId", - * Robots::find("type = "mechanical""), - * "using" => ["id", "name"], - * ] + * [ + * "robotId", + * Robots::find("type = "mechanical""), + * "using" => ["id", "name"], + * ] * ); * + * * Volt syntax: * * {{ select("robotId", robots, "using": ["id", "name"]) }} * * - * @param array $parameters - * @param array $data - * @return string + * + * @param array $parameters + * @param array $data + * @return string */ public static function select($parameters, $data = null) {} /** * Builds a HTML TEXTAREA tag + * * * echo Phalcon\Tag::textArea( - * [ - * "comments", - * "cols" => 10, - * "rows" => 4, - * ] + * [ + * "comments", + * "cols" => 10, + * "rows" => 4, + * ] * ); * + * * Volt syntax: * * {{ text_area("comments", "cols": 10, "rows": 4) }} * * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function textArea($parameters) {} /** * Builds a HTML FORM tag + * * * echo Phalcon\Tag::form("posts/save"); + * * echo Phalcon\Tag::form( - * [ - * "posts/save", - * "method" => "post", - * ] + * [ + * "posts/save", + * "method" => "post", + * ] * ); * + * * Volt syntax: * * {{ form("posts/save") }} * {{ form("posts/save", "method": "post") }} * * - * @param array $parameters - * @return string + * + * @param array $parameters + * @return string */ public static function form($parameters) {} /** * Builds a HTML close FORM tag * - * @return string + * @return string */ public static function endForm() {} /** * Set the title of view content + * * * Phalcon\Tag::setTitle("Welcome to my Page"); * * - * @param string $title + * @param string $title */ public static function setTitle($title) {} /** * Set the title separator of view content + * * * Phalcon\Tag::setTitleSeparator("-"); * * - * @param string $titleSeparator + * @param string $titleSeparator */ public static function setTitleSeparator($titleSeparator) {} /** * Appends a text to current document title * - * @param string $title + * @param string $title */ public static function appendTitle($title) {} /** * Prepends a text to current document title * - * @param string $title + * @param string $title */ public static function prependTitle($title) {} /** * Gets the current document title. * The title will be automatically escaped. + * * * echo Phalcon\Tag::getTitle(); * + * * * {{ get_title() }} * * - * @param bool $tags - * @return string + * @param bool $tags + * @return string */ public static function getTitle($tags = true) {} /** * Gets the current document title separator + * * * echo Phalcon\Tag::getTitleSeparator(); * + * * * {{ get_title_separator() }} * * - * @return string + * @return string */ public static function getTitleSeparator() {} /** * Builds a LINK[rel="stylesheet"] tag + * * * echo Phalcon\Tag::stylesheetLink("http://fonts.googleapis.com/css?family=Rosario", false); * echo Phalcon\Tag::stylesheetLink("css/style.css"); * + * * Volt Syntax: * * {{ stylesheet_link("http://fonts.googleapis.com/css?family=Rosario", false) }} * {{ stylesheet_link("css/style.css") }} * * - * @param array $parameters - * @param boolean $local - * @return string + * + * @param array $parameters + * @param boolean $local + * @return string */ public static function stylesheetLink($parameters = null, $local = true) {} /** * Builds a SCRIPT[type="javascript"] tag + * * * echo Phalcon\Tag::javascriptInclude("http://ajax.googleapis.com/ajax/libs/jquery/2.2.3/jquery.min.js", false); * echo Phalcon\Tag::javascriptInclude("javascript/jquery.js"); * + * * Volt syntax: * * {{ javascript_include("http://ajax.googleapis.com/ajax/libs/jquery/2.2.3/jquery.min.js", false) }} * {{ javascript_include("javascript/jquery.js") }} * * - * @param array $parameters - * @param boolean $local - * @return string + * + * @param array $parameters + * @param boolean $local + * @return string */ public static function javascriptInclude($parameters = null, $local = true) {} /** * Builds HTML IMG tags + * * * echo Phalcon\Tag::image("img/bg.png"); + * * echo Phalcon\Tag::image( - * [ - * "img/photo.jpg", - * "alt" => "Some Photo", - * ] + * [ + * "img/photo.jpg", + * "alt" => "Some Photo", + * ] * ); * + * * Volt Syntax: * * {{ image("img/bg.png") }} @@ -731,61 +815,64 @@ public static function javascriptInclude($parameters = null, $local = true) {} * {{ image("http://static.mywebsite.com/img/bg.png", false) }} * * - * @param array $parameters - * @param boolean $local - * @return string + * + * @param array $parameters + * @param boolean $local + * @return string */ public static function image($parameters = null, $local = true) {} /** * Converts texts into URL-friendly titles + * * * echo Phalcon\Tag::friendlyTitle("These are big important news", "-") * * - * @param string $text - * @param string $separator - * @param bool $lowercase - * @param mixed $replace - * @return string + * @param string $text + * @param string $separator + * @param bool $lowercase + * @param mixed $replace + * @return string */ public static function friendlyTitle($text, $separator = "-", $lowercase = true, $replace = null) {} /** * Set the document type of content * - * @param int $doctype + * @param int $doctype */ public static function setDocType($doctype) {} /** * Get the document type declaration of content * - * @return string + * @return string */ public static function getDocType() {} /** * Builds a HTML tag * - * @param string $tagName - * @param mixed $parameters - * @param bool $selfClose - * @param bool $onlyStart - * @param bool $useEol - * @return string + * @param string $tagName + * @param mixed $parameters + * @param bool $selfClose + * @param bool $onlyStart + * @param bool $useEol + * @return string */ public static function tagHtml($tagName, $parameters = null, $selfClose = false, $onlyStart = false, $useEol = false) {} /** * Builds a HTML tag closing tag + * * * echo Phalcon\Tag::tagHtmlClose("script", true); * * - * @param string $tagName - * @param bool $useEol - * @return string + * @param string $tagName + * @param bool $useEol + * @return string */ public static function tagHtmlClose($tagName, $useEol = false) {} diff --git a/ide/stubs/Phalcon/Text.php b/ide/stubs/Phalcon/Text.php index 3be0b1166..2a477e2b2 100644 --- a/ide/stubs/Phalcon/Text.php +++ b/ide/stubs/Phalcon/Text.php @@ -4,6 +4,7 @@ /** * Phalcon\Text + * * Provides utilities to work with texts */ abstract class Text @@ -26,189 +27,207 @@ abstract class Text /** * Converts strings to camelize style + * * * echo Phalcon\Text::camelize("coco_bongo"); // CocoBongo * echo Phalcon\Text::camelize("co_co-bon_go", "-"); // Co_coBon_go * echo Phalcon\Text::camelize("co_co-bon_go", "_-"); // CoCoBonGo * * - * @param string $str - * @param mixed $delimiter - * @return string + * @param string $str + * @param mixed $delimiter + * @return string */ public static function camelize($str, $delimiter = null) {} /** * Uncamelize strings which are camelized + * * * echo Phalcon\Text::uncamelize("CocoBongo"); // coco_bongo * echo Phalcon\Text::uncamelize("CocoBongo", "-"); // coco-bongo * * - * @param string $str - * @param mixed $delimiter - * @return string + * @param string $str + * @param mixed $delimiter + * @return string */ public static function uncamelize($str, $delimiter = null) {} /** * Adds a number to a string or increment that number if it already is defined + * * * echo Phalcon\Text::increment("a"); // "a_1" * echo Phalcon\Text::increment("a_1"); // "a_2" * * - * @param string $str - * @param string $separator - * @return string + * @param string $str + * @param string $separator + * @return string */ public static function increment($str, $separator = "_") {} /** - * Generates a random string based on the given type. Type is one of the RANDOM_* constants + * Generates a random string based on the given type. Type is one of the RANDOM_ constants + * * * // "aloiwkqz" * echo Phalcon\Text::random( - * Phalcon\Text::RANDOM_ALNUM + * Phalcon\Text::RANDOM_ALNUM * ); * * - * @param int $type - * @param long $length - * @return string + * @param int $type + * @param long $length + * @return string */ public static function random($type = 0, $length = 8) {} /** * Check if a string starts with a given string + * * * echo Phalcon\Text::startsWith("Hello", "He"); // true * echo Phalcon\Text::startsWith("Hello", "he", false); // false * echo Phalcon\Text::startsWith("Hello", "he"); // true * * - * @param string $str - * @param string $start - * @param bool $ignoreCase - * @return bool + * @param string $str + * @param string $start + * @param bool $ignoreCase + * @return bool */ public static function startsWith($str, $start, $ignoreCase = true) {} /** * Check if a string ends with a given string + * * * echo Phalcon\Text::endsWith("Hello", "llo"); // true * echo Phalcon\Text::endsWith("Hello", "LLO", false); // false * echo Phalcon\Text::endsWith("Hello", "LLO"); // true * * - * @param string $str - * @param string $end - * @param bool $ignoreCase - * @return bool + * @param string $str + * @param string $end + * @param bool $ignoreCase + * @return bool */ public static function endsWith($str, $end, $ignoreCase = true) {} /** * Lowercases a string, this function makes use of the mbstring extension if available + * * * echo Phalcon\Text::lower("HELLO"); // hello * * - * @param string $str - * @param string $encoding - * @return string + * @param string $str + * @param string $encoding + * @return string */ public static function lower($str, $encoding = "UTF-8") {} /** * Uppercases a string, this function makes use of the mbstring extension if available + * * * echo Phalcon\Text::upper("hello"); // HELLO * * - * @param string $str - * @param string $encoding - * @return string + * @param string $str + * @param string $encoding + * @return string */ public static function upper($str, $encoding = "UTF-8") {} /** * Reduces multiple slashes in a string to single slashes + * * * echo Phalcon\Text::reduceSlashes("foo//bar/baz"); // foo/bar/baz * echo Phalcon\Text::reduceSlashes("http://foo.bar///baz/buz"); // http://foo.bar/baz/buz * * - * @param string $str - * @return string + * @param string $str + * @return string */ public static function reduceSlashes($str) {} /** * Concatenates strings using the separator only once without duplication in places concatenation + * * * $str = Phalcon\Text::concat( - * "/", - * "/tmp/", - * "/folder_1/", - * "/folder_2", - * "folder_3/" + * "/", + * "/tmp/", + * "/folder_1/", + * "/folder_2", + * "folder_3/" * ); + * * // /tmp/folder_1/folder_2/folder_3/ * echo $str; * * - * @param string $separator - * @param string $a - * @param string $b - * @param string $...N - * @return string + * + * @param string $separator + * @param string $a + * @param string $b + * @param string $...N + * @return string */ public static function concat() {} /** * Generates random text in accordance with the template + * * * // Hi my name is a Bob * echo Phalcon\Text::dynamic("{Hi|Hello}, my name is a {Bob|Mark|Jon}!"); + * * // Hi my name is a Jon * echo Phalcon\Text::dynamic("{Hi|Hello}, my name is a {Bob|Mark|Jon}!"); + * * // Hello my name is a Bob * echo Phalcon\Text::dynamic("{Hi|Hello}, my name is a {Bob|Mark|Jon}!"); + * * // Hello my name is a Zyxep * echo Phalcon\Text::dynamic("[Hi/Hello], my name is a [Zyxep/Mark]!", "[", "]", "/"); * * - * @param string $text - * @param string $leftDelimiter - * @param string $rightDelimiter - * @param string $separator - * @return string + * @param string $text + * @param string $leftDelimiter + * @param string $rightDelimiter + * @param string $separator + * @return string */ public static function dynamic($text, $leftDelimiter = "{", $rightDelimiter = "}", $separator = "|") {} /** * Makes a phrase underscored instead of spaced + * * * echo Phalcon\Text::underscore("look behind"); // "look_behind" * echo Phalcon\Text::underscore("Awesome Phalcon"); // "Awesome_Phalcon" * * - * @param string $text - * @return string + * @param string $text + * @return string */ public static function underscore($text) {} /** * Makes an underscored or dashed phrase human-readable + * * * echo Phalcon\Text::humanize("start-a-horse"); // "start a horse" * echo Phalcon\Text::humanize("five_cats"); // "five cats" * * - * @param string $text - * @return string + * @param string $text + * @return string */ public static function humanize($text) {} diff --git a/ide/stubs/Phalcon/Translate.php b/ide/stubs/Phalcon/Translate.php index e0cf39581..ad8cc91c6 100644 --- a/ide/stubs/Phalcon/Translate.php +++ b/ide/stubs/Phalcon/Translate.php @@ -4,6 +4,7 @@ /** * Phalcon\Translate + * * Translate component allows the creation of multi-language applications using * different adapters for translation lists. */ diff --git a/ide/stubs/Phalcon/Validation.php b/ide/stubs/Phalcon/Validation.php index 8a445b701..0937f14e2 100644 --- a/ide/stubs/Phalcon/Validation.php +++ b/ide/stubs/Phalcon/Validation.php @@ -4,6 +4,7 @@ /** * Phalcon\Validation + * * Allows to validate data using custom or built-in validators */ class Validation extends \Phalcon\Di\Injectable implements \Phalcon\ValidationInterface @@ -37,134 +38,140 @@ class Validation extends \Phalcon\Di\Injectable implements \Phalcon\ValidationIn /** - * @param mixed $validators + * @param mixed $validators */ public function setValidators($validators) {} /** * Phalcon\Validation constructor * - * @param array $validators + * @param array $validators */ public function __construct(array $validators = null) {} /** * Validate a set of data according to a set of rules * - * @param array|object $data - * @param object $entity - * @return \Phalcon\Validation\Message\Group + * + * @param array|object $data + * @param object $entity + * @return \Phalcon\Validation\Message\Group */ public function validate($data = null, $entity = null) {} /** * Adds a validator to a field * - * @param mixed $field - * @param mixed $validator - * @return Validation + * @param mixed $field + * @param \Phalcon\Validation\ValidatorInterface $validator + * @return Validation */ public function add($field, \Phalcon\Validation\ValidatorInterface $validator) {} /** * Alias of `add` method * - * @param mixed $field - * @param mixed $validator - * @return Validation + * @param mixed $field + * @param \Phalcon\Validation\ValidatorInterface $validator + * @return Validation */ public function rule($field, \Phalcon\Validation\ValidatorInterface $validator) {} /** * Adds the validators to a field * - * @param mixed $field - * @param array $validators - * @return Validation + * @param mixed $field + * @param array $validators + * @return Validation */ public function rules($field, array $validators) {} /** * Adds filters to the field * - * @param string $field - * @param array|string $filters - * @return \Phalcon\Validation + * + * @param string $field + * @param array|string $filters + * @return Validation */ public function setFilters($field, $filters) {} /** * Returns all the filters or a specific one * - * @param string $field - * @return mixed + * + * @param string $field + * @return mixed */ public function getFilters($field = null) {} /** * Returns the validators added to the validation * - * @return array + * @return array */ public function getValidators() {} /** * Sets the bound entity * - * @param object $entity + * + * @param object $entity */ public function setEntity($entity) {} /** * Returns the bound entity * - * @return object + * + * @return object */ public function getEntity() {} /** * Adds default messages to validators * - * @param array $messages - * @return array + * @param array $messages + * @return array */ public function setDefaultMessages(array $messages = array()) {} /** * Get default message for validator type * - * @param string $type - * @return string + * @param string $type + * @return string */ public function getDefaultMessage($type) {} /** * Returns the registered validators * - * @return \Phalcon\Validation\Message\Group + * @return \Phalcon\Validation\Message\Group */ public function getMessages() {} /** * Adds labels for fields * - * @param array $labels + * @param array $labels */ public function setLabels(array $labels) {} /** * Get label for field * - * @param string $field - * @return string + * + * @param string $field + * @return string */ public function getLabel($field) {} /** * Appends a message to the messages list * - * @param mixed $message - * @return Validation + * @param \Phalcon\Validation\MessageInterface $message + * @return Validation */ public function appendMessage(\Phalcon\Validation\MessageInterface $message) {} @@ -172,26 +179,28 @@ public function appendMessage(\Phalcon\Validation\MessageInterface $message) {} * Assigns the data to an entity * The entity is used to obtain the validation values * - * @param object $entity - * @param array|object $data - * @return \Phalcon\Validation + * + * @param object $entity + * @param array|object $data + * @return Validation */ public function bind($entity, $data) {} /** * Gets the a value to validate in the array/object data source * - * @param string $field - * @return mixed + * + * @param string $field + * @return mixed */ public function getValue($field) {} /** * Internal validations, if it returns true, then skip the current validator * - * @param mixed $field - * @param mixed $validator - * @return bool + * @param mixed $field + * @param \Phalcon\Validation\ValidatorInterface $validator + * @return bool */ protected function preChecking($field, \Phalcon\Validation\ValidatorInterface $validator) {} diff --git a/ide/stubs/Phalcon/ValidationInterface.php b/ide/stubs/Phalcon/ValidationInterface.php index 5751ff3b6..124414055 100644 --- a/ide/stubs/Phalcon/ValidationInterface.php +++ b/ide/stubs/Phalcon/ValidationInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\ValidationInterface + * * Interface for the Phalcon\Validation component */ interface ValidationInterface @@ -12,53 +13,56 @@ interface ValidationInterface /** * Validate a set of data according to a set of rules * - * @param array|object $data - * @param object $entity - * @return \Phalcon\Validation\Message\Group + * + * @param array|object $data + * @param object $entity + * @return \Phalcon\Validation\Message\Group */ public function validate($data = null, $entity = null); /** * Adds a validator to a field * - * @param string $field - * @param mixed $validator - * @return Validation + * @param string $field + * @param \Phalcon\Validation\ValidatorInterface $validator + * @return Validation */ public function add($field, \Phalcon\Validation\ValidatorInterface $validator); /** * Alias of `add` method * - * @param string $field - * @param mixed $validator - * @return Validation + * @param string $field + * @param \Phalcon\Validation\ValidatorInterface $validator + * @return Validation */ public function rule($field, \Phalcon\Validation\ValidatorInterface $validator); /** * Adds the validators to a field * - * @param string $field - * @param array $validators - * @return Validation + * @param string $field + * @param array $validators + * @return Validation */ public function rules($field, array $validators); /** * Adds filters to the field * - * @param string $field - * @param array|string $filters - * @return \Phalcon\Validation + * + * @param string $field + * @param array|string $filters + * @return Validation */ public function setFilters($field, $filters); /** * Returns all the filters or a specific one * - * @param string $field - * @return mixed + * + * @param string $field + * @return mixed */ public function getFilters($field = null); @@ -70,50 +74,53 @@ public function getValidators(); /** * Returns the bound entity * - * @return object + * + * @return object */ public function getEntity(); /** * Adds default messages to validators * - * @param array $messages + * @param array $messages */ public function setDefaultMessages(array $messages = array()); /** * Get default message for validator type * - * @param string $type + * + * @param string $type */ public function getDefaultMessage($type); /** * Returns the registered validators * - * @return \Phalcon\Validation\Message\Group + * @return \Phalcon\Validation\Message\Group */ public function getMessages(); /** * Adds labels for fields * - * @param array $labels + * @param array $labels */ public function setLabels(array $labels); /** * Get label for field * - * @param string $field - * @return string + * + * @param string $field + * @return string */ public function getLabel($field); /** * Appends a message to the messages list * - * @param mixed $message + * @param \Phalcon\Validation\MessageInterface $message */ public function appendMessage(\Phalcon\Validation\MessageInterface $message); @@ -121,17 +128,19 @@ public function appendMessage(\Phalcon\Validation\MessageInterface $message); * Assigns the data to an entity * The entity is used to obtain the validation values * - * @param object $entity - * @param array|object $data - * @return \Phalcon\Validation + * + * @param object $entity + * @param array|object $data + * @return Validation */ public function bind($entity, $data); /** * Gets the a value to validate in the array/object data source * - * @param string $field - * @return mixed + * + * @param string $field + * @return mixed */ public function getValue($field); diff --git a/ide/stubs/Phalcon/Version.php b/ide/stubs/Phalcon/Version.php index aecc3152e..dbc7544df 100644 --- a/ide/stubs/Phalcon/Version.php +++ b/ide/stubs/Phalcon/Version.php @@ -4,15 +4,17 @@ /** * Phalcon\Version + * * This class allows to get the installed version of the framework */ class Version { /** * The constant referencing the major version. Returns 0 + * * * echo Phalcon\Version::getPart( - * Phalcon\Version::VERSION_MAJOR + * Phalcon\Version::VERSION_MAJOR * ); * */ @@ -20,9 +22,10 @@ class Version /** * The constant referencing the major version. Returns 1 + * * * echo Phalcon\Version::getPart( - * Phalcon\Version::VERSION_MEDIUM + * Phalcon\Version::VERSION_MEDIUM * ); * */ @@ -30,9 +33,10 @@ class Version /** * The constant referencing the major version. Returns 2 + * * * echo Phalcon\Version::getPart( - * Phalcon\Version::VERSION_MINOR + * Phalcon\Version::VERSION_MINOR * ); * */ @@ -40,9 +44,10 @@ class Version /** * The constant referencing the major version. Returns 3 + * * * echo Phalcon\Version::getPart( - * Phalcon\Version::VERSION_SPECIAL + * Phalcon\Version::VERSION_SPECIAL * ); * */ @@ -50,9 +55,10 @@ class Version /** * The constant referencing the major version. Returns 4 + * * * echo Phalcon\Version::getPart( - * Phalcon\Version::VERSION_SPECIAL_NUMBER + * Phalcon\Version::VERSION_SPECIAL_NUMBER * ); * */ @@ -62,56 +68,61 @@ class Version /** * Area where the version number is set. The format is as follows: * ABBCCDE + * * A - Major version * B - Med version (two digits) * C - Min version (two digits) * D - Special release: 1 = Alpha, 2 = Beta, 3 = RC, 4 = Stable * E - Special release version i.e. RC1, Beta2 etc. * - * @return array + * @return array */ protected static function _getVersion() {} /** * Translates a number to a special release + * * If Special release = 1 this function will return ALPHA * - * @param int $special - * @return string + * @param int $special + * @return string */ protected final static function _getSpecial($special) {} /** * Returns the active version (string) + * * * echo Phalcon\Version::get(); * * - * @return string + * @return string */ public static function get() {} /** * Returns the numeric active version + * * * echo Phalcon\Version::getId(); * * - * @return string + * @return string */ public static function getId() {} /** * Returns a specific part of the version. If the wrong parameter is passed * it will return the full version + * * * echo Phalcon\Version::getPart( - * Phalcon\Version::VERSION_MAJOR + * Phalcon\Version::VERSION_MAJOR * ); * * - * @param int $part - * @return string + * @param int $part + * @return string */ public static function getPart($part) {} diff --git a/ide/stubs/Phalcon/acl/Adapter.php b/ide/stubs/Phalcon/acl/Adapter.php index d261e1917..359ab91ba 100644 --- a/ide/stubs/Phalcon/acl/Adapter.php +++ b/ide/stubs/Phalcon/acl/Adapter.php @@ -4,6 +4,7 @@ /** * Phalcon\Acl\Adapter + * * Adapter for Phalcon\Acl adapters */ abstract class Adapter implements \Phalcon\Acl\AdapterInterface, \Phalcon\Events\EventsAwareInterface @@ -54,49 +55,49 @@ 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 mixed */ public function getActiveRole() {} /** * Resource which the list is checking if some role can access it * - * @return mixed + * @return mixed */ public function getActiveResource() {} /** * Active access which the list is checking if some role can access it * - * @return mixed + * @return mixed */ public function getActiveAccess() {} /** * Sets the events manager * - * @param mixed $eventsManager + * @param \Phalcon\Events\ManagerInterface $eventsManager */ public function setEventsManager(\Phalcon\Events\ManagerInterface $eventsManager) {} /** * Returns the internal event manager * - * @return \Phalcon\Events\ManagerInterface + * @return \Phalcon\Events\ManagerInterface */ public function getEventsManager() {} /** * Sets the default access level (Phalcon\Acl::ALLOW or Phalcon\Acl::DENY) * - * @param int $defaultAccess + * @param int $defaultAccess */ public function setDefaultAction($defaultAccess) {} /** * Returns the default ACL access level * - * @return int + * @return int */ public function getDefaultAction() {} diff --git a/ide/stubs/Phalcon/acl/AdapterInterface.php b/ide/stubs/Phalcon/acl/AdapterInterface.php index 1b453e5a5..18083be53 100644 --- a/ide/stubs/Phalcon/acl/AdapterInterface.php +++ b/ide/stubs/Phalcon/acl/AdapterInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Acl\AdapterInterface + * * Interface for Phalcon\Acl adapters */ interface AdapterInterface @@ -12,14 +13,14 @@ interface AdapterInterface /** * Sets the default access level (Phalcon\Acl::ALLOW or Phalcon\Acl::DENY) * - * @param int $defaultAccess + * @param int $defaultAccess */ public function setDefaultAction($defaultAccess); /** * Returns the default ACL access level * - * @return int + * @return int */ public function getDefaultAction(); @@ -27,7 +28,7 @@ public function getDefaultAction(); * Sets the default access level (Phalcon\Acl::ALLOW or Phalcon\Acl::DENY) * for no arguments provided in isAllowed action if there exists func for accessKey * - * @param int $defaultAccess + * @param int $defaultAccess */ public function setNoArgumentsDefaultAction($defaultAccess); @@ -35,134 +36,135 @@ public function setNoArgumentsDefaultAction($defaultAccess); * Returns the default ACL access level for no arguments provided in * isAllowed action if there exists func for accessKey * - * @return int + * @return int */ public function getNoArgumentsDefaultAction(); /** * Adds a role to the ACL list. Second parameter lets to inherit access data from other existing role * - * @param mixed $role - * @param mixed $accessInherits - * @return bool + * @param mixed $role + * @param mixed $accessInherits + * @return bool */ public function addRole($role, $accessInherits = null); /** * Do a role inherit from another existing role * - * @param string $roleName - * @param mixed $roleToInherit - * @return bool + * @param string $roleName + * @param mixed $roleToInherit + * @return bool */ public function addInherit($roleName, $roleToInherit); /** * Check whether role exist in the roles list * - * @param string $roleName - * @return bool + * @param string $roleName + * @return bool */ public function isRole($roleName); /** * Check whether resource exist in the resources list * - * @param string $resourceName - * @return bool + * @param string $resourceName + * @return bool */ public function isResource($resourceName); /** * Adds a resource to the ACL list + * * Access names can be a particular action, by example * search, update, delete, etc or a list of them * - * @param mixed $resourceObject - * @param mixed $accessList - * @return bool + * @param mixed $resourceObject + * @param mixed $accessList + * @return bool */ public function addResource($resourceObject, $accessList); /** * Adds access to resources * - * @param string $resourceName - * @param mixed $accessList + * @param string $resourceName + * @param mixed $accessList */ public function addResourceAccess($resourceName, $accessList); /** * Removes an access from a resource * - * @param string $resourceName - * @param mixed $accessList + * @param string $resourceName + * @param mixed $accessList */ public function dropResourceAccess($resourceName, $accessList); /** * Allow access to a role on a resource * - * @param string $roleName - * @param string $resourceName - * @param mixed $access - * @param mixed $func + * @param string $roleName + * @param string $resourceName + * @param mixed $access + * @param mixed $func */ public function allow($roleName, $resourceName, $access, $func = null); /** * Deny access to a role on a resource * - * @param string $roleName - * @param string $resourceName - * @param mixed $access - * @param mixed $func + * @param string $roleName + * @param string $resourceName + * @param mixed $access + * @param mixed $func */ public function deny($roleName, $resourceName, $access, $func = null); /** * Check whether a role is allowed to access an action from a resource * - * @param mixed $roleName - * @param mixed $resourceName - * @param mixed $access - * @param array $parameters - * @return bool + * @param mixed $roleName + * @param mixed $resourceName + * @param mixed $access + * @param array $parameters + * @return bool */ public function isAllowed($roleName, $resourceName, $access, array $parameters = null); /** * Returns the role which the list is checking if it's allowed to certain resource/access * - * @return string + * @return string */ public function getActiveRole(); /** * Returns the resource which the list is checking if some role can access it * - * @return string + * @return string */ public function getActiveResource(); /** * Returns the access which the list is checking if some role can access it * - * @return string + * @return string */ public function getActiveAccess(); /** * Return an array with every role registered in the list * - * @return RoleInterface[] + * @return RoleInterface[] */ public function getRoles(); /** * Return an array with every resource registered in the list * - * @return ResourceInterface[] + * @return ResourceInterface[] */ public function getResources(); diff --git a/ide/stubs/Phalcon/acl/Exception.php b/ide/stubs/Phalcon/acl/Exception.php index 8fc870bb0..9d0749468 100644 --- a/ide/stubs/Phalcon/acl/Exception.php +++ b/ide/stubs/Phalcon/acl/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Acl\Exception + * * Class for exceptions thrown by Phalcon\Acl */ class Exception extends \Phalcon\Exception diff --git a/ide/stubs/Phalcon/acl/Resource.php b/ide/stubs/Phalcon/acl/Resource.php index cb32f3068..f1e38660b 100644 --- a/ide/stubs/Phalcon/acl/Resource.php +++ b/ide/stubs/Phalcon/acl/Resource.php @@ -4,6 +4,7 @@ /** * Phalcon\Acl\Resource + * * This class defines resource entity and its description */ class Resource implements \Phalcon\Acl\ResourceInterface @@ -26,29 +27,29 @@ class Resource implements \Phalcon\Acl\ResourceInterface /** * Resource name * - * @return string + * @return string */ public function getName() {} /** * Resource name * - * @return string + * @return string */ public function __toString() {} /** * Resource description * - * @return string + * @return string */ public function getDescription() {} /** * Phalcon\Acl\Resource constructor * - * @param string $name - * @param string $description + * @param string $name + * @param string $description */ public function __construct($name, $description = null) {} diff --git a/ide/stubs/Phalcon/acl/ResourceAware.php b/ide/stubs/Phalcon/acl/ResourceAware.php index 197a1a4ee..a6909acd9 100644 --- a/ide/stubs/Phalcon/acl/ResourceAware.php +++ b/ide/stubs/Phalcon/acl/ResourceAware.php @@ -4,6 +4,7 @@ /** * Phalcon\Acl\ResourceAware + * * Interface for classes which could be used in allow method as RESOURCE */ interface ResourceAware @@ -12,7 +13,7 @@ interface ResourceAware /** * Returns resource name * - * @return string + * @return string */ public function getResourceName(); diff --git a/ide/stubs/Phalcon/acl/ResourceInterface.php b/ide/stubs/Phalcon/acl/ResourceInterface.php index b71f6044a..f4019160a 100644 --- a/ide/stubs/Phalcon/acl/ResourceInterface.php +++ b/ide/stubs/Phalcon/acl/ResourceInterface.php @@ -3,7 +3,9 @@ namespace Phalcon\Acl; /** + * * Phalcon\Acl\ResourceInterface + * * Interface for Phalcon\Acl\Resource */ interface ResourceInterface @@ -12,21 +14,21 @@ interface ResourceInterface /** * Returns the resource name * - * @return string + * @return string */ public function getName(); /** * Returns resource description * - * @return string + * @return string */ public function getDescription(); /** * Magic method __toString * - * @return string + * @return string */ public function __toString(); diff --git a/ide/stubs/Phalcon/acl/Role.php b/ide/stubs/Phalcon/acl/Role.php index 4be7debe1..94618216c 100644 --- a/ide/stubs/Phalcon/acl/Role.php +++ b/ide/stubs/Phalcon/acl/Role.php @@ -4,6 +4,7 @@ /** * Phalcon\Acl\Role + * * This class defines role entity and its description */ class Role implements \Phalcon\Acl\RoleInterface @@ -26,29 +27,29 @@ class Role implements \Phalcon\Acl\RoleInterface /** * Role name * - * @return string + * @return string */ public function getName() {} /** * Role name * - * @return string + * @return string */ public function __toString() {} /** * Role description * - * @return string + * @return string */ public function getDescription() {} /** * Phalcon\Acl\Role constructor * - * @param string $name - * @param string $description + * @param string $name + * @param string $description */ public function __construct($name, $description = null) {} diff --git a/ide/stubs/Phalcon/acl/RoleAware.php b/ide/stubs/Phalcon/acl/RoleAware.php index 4175fe48f..efbe9b573 100644 --- a/ide/stubs/Phalcon/acl/RoleAware.php +++ b/ide/stubs/Phalcon/acl/RoleAware.php @@ -4,6 +4,7 @@ /** * Phalcon\Acl\RoleAware + * * Interface for classes which could be used in allow method as ROLE */ interface RoleAware @@ -12,7 +13,7 @@ interface RoleAware /** * Returns role name * - * @return string + * @return string */ public function getRoleName(); diff --git a/ide/stubs/Phalcon/acl/RoleInterface.php b/ide/stubs/Phalcon/acl/RoleInterface.php index 2e9192e0d..6baa87008 100644 --- a/ide/stubs/Phalcon/acl/RoleInterface.php +++ b/ide/stubs/Phalcon/acl/RoleInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Acl\RoleInterface + * * Interface for Phalcon\Acl\Role */ interface RoleInterface @@ -12,21 +13,21 @@ interface RoleInterface /** * Returns the role name * - * @return string + * @return string */ public function getName(); /** * Returns role description * - * @return string + * @return string */ public function getDescription(); /** * Magic method __toString * - * @return string + * @return string */ public function __toString(); diff --git a/ide/stubs/Phalcon/acl/adapter/Memory.php b/ide/stubs/Phalcon/acl/adapter/Memory.php index f69fd3329..f35283f2b 100644 --- a/ide/stubs/Phalcon/acl/adapter/Memory.php +++ b/ide/stubs/Phalcon/acl/adapter/Memory.php @@ -4,56 +4,66 @@ /** * Phalcon\Acl\Adapter\Memory + * * Manages ACL lists in memory + * * * $acl = new \Phalcon\Acl\Adapter\Memory(); + * * $acl->setDefaultAction( - * \Phalcon\Acl::DENY + * \Phalcon\Acl::DENY * ); + * * // Register roles * $roles = [ - * "users" => new \Phalcon\Acl\Role("Users"), - * "guests" => new \Phalcon\Acl\Role("Guests"), + * "users" => new \Phalcon\Acl\Role("Users"), + * "guests" => new \Phalcon\Acl\Role("Guests"), * ]; * foreach ($roles as $role) { - * $acl->addRole($role); + * $acl->addRole($role); * } + * * // Private area resources * $privateResources = [ - * "companies" => ["index", "search", "new", "edit", "save", "create", "delete"], - * "products" => ["index", "search", "new", "edit", "save", "create", "delete"], - * "invoices" => ["index", "profile"], + * "companies" => ["index", "search", "new", "edit", "save", "create", "delete"], + * "products" => ["index", "search", "new", "edit", "save", "create", "delete"], + * "invoices" => ["index", "profile"], * ]; + * * foreach ($privateResources as $resourceName => $actions) { - * $acl->addResource( - * new \Phalcon\Acl\Resource($resourceName), - * $actions - * ); + * $acl->addResource( + * new \Phalcon\Acl\Resource($resourceName), + * $actions + * ); * } + * * // Public area resources * $publicResources = [ - * "index" => ["index"], - * "about" => ["index"], - * "session" => ["index", "register", "start", "end"], - * "contact" => ["index", "send"], + * "index" => ["index"], + * "about" => ["index"], + * "session" => ["index", "register", "start", "end"], + * "contact" => ["index", "send"], * ]; + * * foreach ($publicResources as $resourceName => $actions) { - * $acl->addResource( - * new \Phalcon\Acl\Resource($resourceName), - * $actions - * ); + * $acl->addResource( + * new \Phalcon\Acl\Resource($resourceName), + * $actions + * ); * } + * * // Grant access to public areas to both users and guests * foreach ($roles as $role){ - * foreach ($publicResources as $resource => $actions) { - * $acl->allow($role->getName(), $resource, "*"); - * } + * foreach ($publicResources as $resource => $actions) { + * $acl->allow($role->getName(), $resource, ""); + * } * } + * * // Grant access to private area to role Users * foreach ($privateResources as $resource => $actions) { - * foreach ($actions as $action) { - * $acl->allow("Users", $resource, $action); - * } + * foreach ($actions as $action) { + * $acl->allow("Users", $resource, $action); + * } * } * */ @@ -62,6 +72,7 @@ class Memory extends \Phalcon\Acl\Adapter /** * Roles Names * + * * @var mixed */ protected $_rolesNames; @@ -69,6 +80,7 @@ class Memory extends \Phalcon\Acl\Adapter /** * Roles * + * * @var mixed */ protected $_roles; @@ -76,6 +88,7 @@ class Memory extends \Phalcon\Acl\Adapter /** * Resource Names * + * * @var mixed */ protected $_resourcesNames; @@ -83,6 +96,7 @@ class Memory extends \Phalcon\Acl\Adapter /** * Resources * + * * @var mixed */ protected $_resources; @@ -90,6 +104,7 @@ class Memory extends \Phalcon\Acl\Adapter /** * Access * + * * @var mixed */ protected $_access; @@ -97,6 +112,7 @@ class Memory extends \Phalcon\Acl\Adapter /** * Role Inherits * + * * @var mixed */ protected $_roleInherits; @@ -104,6 +120,7 @@ class Memory extends \Phalcon\Acl\Adapter /** * Access List * + * * @var mixed */ protected $_accessList; @@ -111,6 +128,7 @@ class Memory extends \Phalcon\Acl\Adapter /** * Function List * + * * @var mixed */ protected $_func; @@ -118,6 +136,7 @@ class Memory extends \Phalcon\Acl\Adapter /** * Default action for no arguments is allow * + * * @var mixed */ protected $_noArgumentsDefaultAction = Acl::ALLOW; @@ -130,167 +149,190 @@ public function __construct() {} /** * Adds a role to the ACL list. Second parameter allows inheriting access data from other existing role + * * Example: * * $acl->addRole( - * new Phalcon\Acl\Role("administrator"), - * "consultant" + * new Phalcon\Acl\Role("administrator"), + * "consultant" * ); + * * $acl->addRole("administrator", "consultant"); * * - * @param RoleInterface|string $role - * @param array|string $accessInherits - * @return bool + * + * @param RoleInterface|string $role + * @param array|string $accessInherits + * @return bool */ public function addRole($role, $accessInherits = null) {} /** * Do a role inherit from another existing role * - * @param string $roleName - * @param mixed $roleToInherit - * @return bool + * @param string $roleName + * @param mixed $roleToInherit + * @return bool */ public function addInherit($roleName, $roleToInherit) {} /** * Check whether role exist in the roles list * - * @param string $roleName - * @return bool + * @param string $roleName + * @return bool */ public function isRole($roleName) {} /** * Check whether resource exist in the resources list * - * @param string $resourceName - * @return bool + * @param string $resourceName + * @return bool */ public function isResource($resourceName) {} /** * Adds a resource to the ACL list + * * Access names can be a particular action, by example * search, update, delete, etc or a list of them + * * Example: * * // Add a resource to the the list allowing access to an action * $acl->addResource( - * new Phalcon\Acl\Resource("customers"), - * "search" + * new Phalcon\Acl\Resource("customers"), + * "search" * ); + * * $acl->addResource("customers", "search"); + * * // Add a resource with an access list * $acl->addResource( - * new Phalcon\Acl\Resource("customers"), - * [ - * "create", - * "search", - * ] + * new Phalcon\Acl\Resource("customers"), + * [ + * "create", + * "search", + * ] * ); + * * $acl->addResource( - * "customers", - * [ - * "create", - * "search", - * ] + * "customers", + * [ + * "create", + * "search", + * ] * ); * * - * @param \Phalcon\Acl\Resource|string $resourceValue - * @param array|string $accessList - * @return bool + * + * @param \Phalcon\Acl\Resource|string $resourceValue + * @param array|string $accessList + * @return bool */ public function addResource($resourceValue, $accessList) {} /** * Adds access to resources * - * @param string $resourceName - * @param array|string $accessList - * @return bool + * + * @param string $resourceName + * @param array|string $accessList + * @return bool */ public function addResourceAccess($resourceName, $accessList) {} /** * Removes an access from a resource * - * @param string $resourceName - * @param array|string $accessList + * + * @param string $resourceName + * @param array|string $accessList */ public function dropResourceAccess($resourceName, $accessList) {} /** * Checks if a role has access to a resource * - * @param string $roleName - * @param string $resourceName - * @param mixed $access - * @param mixed $action - * @param mixed $func + * @param string $roleName + * @param string $resourceName + * @param mixed $access + * @param mixed $action + * @param mixed $func */ protected function _allowOrDeny($roleName, $resourceName, $access, $action, $func = null) {} /** * Allow access to a role on a resource - * You can use '*' as wildcard + * + * You can use '' as wildcard + * * Example: * * //Allow access to guests to search on customers * $acl->allow("guests", "customers", "search"); + * * //Allow access to guests to search or create on customers * $acl->allow("guests", "customers", ["search", "create"]); + * * //Allow access to any role to browse on products - * $acl->allow("*", "products", "browse"); + * $acl->allow("", "products", "browse"); + * * //Allow access to any role to browse on any resource - * $acl->allow("*", "*", "browse"); + * $acl->allow("", "", "browse"); * * - * @param string $roleName - * @param string $resourceName - * @param mixed $access - * @param mixed $func + * @param string $roleName + * @param string $resourceName + * @param mixed $access + * @param mixed $func */ public function allow($roleName, $resourceName, $access, $func = null) {} /** * Deny access to a role on a resource - * You can use '*' as wildcard + * + * You can use '' as wildcard + * * Example: * * //Deny access to guests to search on customers * $acl->deny("guests", "customers", "search"); + * * //Deny access to guests to search or create on customers * $acl->deny("guests", "customers", ["search", "create"]); + * * //Deny access to any role to browse on products - * $acl->deny("*", "products", "browse"); + * $acl->deny("", "products", "browse"); + * * //Deny access to any role to browse on any resource - * $acl->deny("*", "*", "browse"); + * $acl->deny("", "", "browse"); * * - * @param string $roleName - * @param string $resourceName - * @param mixed $access - * @param mixed $func + * @param string $roleName + * @param string $resourceName + * @param mixed $access + * @param mixed $func */ public function deny($roleName, $resourceName, $access, $func = null) {} /** * Check whether a role is allowed to access an action from a resource + * * * //Does andres have access to the customers resource to create? * $acl->isAllowed("andres", "Products", "create"); + * * //Do guests have access to any resource to edit? - * $acl->isAllowed("guests", "*", "edit"); + * $acl->isAllowed("guests", "", "edit"); * * - * @param mixed $roleName - * @param mixed $resourceName - * @param string $access - * @param array $parameters - * @return bool + * @param mixed $roleName + * @param mixed $resourceName + * @param string $access + * @param array $parameters + * @return bool */ public function isAllowed($roleName, $resourceName, $access, array $parameters = null) {} @@ -299,7 +341,7 @@ public function isAllowed($roleName, $resourceName, $access, array $parameters = * for no arguments provided in isAllowed action if there exists func for * accessKey * - * @param int $defaultAccess + * @param int $defaultAccess */ public function setNoArgumentsDefaultAction($defaultAccess) {} @@ -307,21 +349,21 @@ public function setNoArgumentsDefaultAction($defaultAccess) {} * Returns the default ACL access level for no arguments provided in * isAllowed action if there exists func for accessKey * - * @return int + * @return int */ public function getNoArgumentsDefaultAction() {} /** * Return an array with every role registered in the list * - * @return RoleInterface[] + * @return \Phalcon\Acl\RoleInterface[] */ public function getRoles() {} /** * Return an array with every resource registered in the list * - * @return ResourceInterface[] + * @return \Phalcon\Acl\ResourceInterface[] */ public function getResources() {} diff --git a/ide/stubs/Phalcon/annotations/Adapter.php b/ide/stubs/Phalcon/annotations/Adapter.php index 211bc3256..5f54f7b0b 100644 --- a/ide/stubs/Phalcon/annotations/Adapter.php +++ b/ide/stubs/Phalcon/annotations/Adapter.php @@ -4,6 +4,7 @@ /** * Phalcon\Annotations\Adapter + * * This is the base class for Phalcon\Annotations adapters */ abstract class Adapter implements \Phalcon\Annotations\AdapterInterface @@ -18,56 +19,57 @@ abstract class Adapter implements \Phalcon\Annotations\AdapterInterface /** * Sets the annotations parser * - * @param mixed $reader + * @param \Phalcon\Annotations\ReaderInterface $reader */ public function setReader(\Phalcon\Annotations\ReaderInterface $reader) {} /** * Returns the annotation reader * - * @return \Phalcon\Annotations\ReaderInterface + * @return \Phalcon\Annotations\ReaderInterface */ public function getReader() {} /** * Parses or retrieves all the annotations found in a class * - * @param string|object $className - * @return \Phalcon\Annotations\Reflection + * + * @param string|object $className + * @return \Phalcon\Annotations\Reflection */ public function get($className) {} /** * Returns the annotations found in all the class' methods * - * @param string $className - * @return array + * @param string $className + * @return array */ public function getMethods($className) {} /** * Returns the annotations found in a specific method * - * @param string $className - * @param string $methodName - * @return \Phalcon\Annotations\Collection + * @param string $className + * @param string $methodName + * @return \Phalcon\Annotations\Collection */ public function getMethod($className, $methodName) {} /** * Returns the annotations found in all the class' methods * - * @param string $className - * @return array + * @param string $className + * @return array */ public function getProperties($className) {} /** * Returns the annotations found in a specific property * - * @param string $className - * @param string $propertyName - * @return \Phalcon\Annotations\Collection + * @param string $className + * @param string $propertyName + * @return \Phalcon\Annotations\Collection */ public function getProperty($className, $propertyName) {} diff --git a/ide/stubs/Phalcon/annotations/AdapterInterface.php b/ide/stubs/Phalcon/annotations/AdapterInterface.php index f79b91732..67e0bda9c 100644 --- a/ide/stubs/Phalcon/annotations/AdapterInterface.php +++ b/ide/stubs/Phalcon/annotations/AdapterInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Annotations\AdapterInterface + * * This interface must be implemented by adapters in Phalcon\Annotations */ interface AdapterInterface @@ -12,56 +13,61 @@ interface AdapterInterface /** * Sets the annotations parser * - * @param mixed $reader + * @param \Phalcon\Annotations\ReaderInterface $reader */ public function setReader(\Phalcon\Annotations\ReaderInterface $reader); /** * Returns the annotation reader * - * @return \Phalcon\Annotations\ReaderInterface + * @return \Phalcon\Annotations\ReaderInterface */ public function getReader(); /** * Parses or retrieves all the annotations found in a class * - * @param string|object $className - * @return \Phalcon\Annotations\Reflection + * + * @param string|object $className + * @return \Phalcon\Annotations\Reflection */ public function get($className); /** * Returns the annotations found in all the class' methods * - * @param string $className - * @return array + * + * @param string $className + * @return array */ public function getMethods($className); /** * Returns the annotations found in a specific method * - * @param string $className - * @param string $methodName - * @return \Phalcon\Annotations\Collection + * + * @param string $className + * @param string $methodName + * @return \Phalcon\Annotations\Collection */ public function getMethod($className, $methodName); /** * Returns the annotations found in all the class' methods * - * @param string $className - * @return array + * + * @param string $className + * @return array */ public function getProperties($className); /** * Returns the annotations found in a specific property * - * @param string $className - * @param string $propertyName - * @return \Phalcon\Annotations\Collection + * + * @param string $className + * @param string $propertyName + * @return \Phalcon\Annotations\Collection */ public function getProperty($className, $propertyName); diff --git a/ide/stubs/Phalcon/annotations/Annotation.php b/ide/stubs/Phalcon/annotations/Annotation.php index 985358323..f533d2598 100644 --- a/ide/stubs/Phalcon/annotations/Annotation.php +++ b/ide/stubs/Phalcon/annotations/Annotation.php @@ -4,6 +4,7 @@ /** * Phalcon\Annotations\Annotation + * * Represents a single annotation in an annotations collection */ class Annotation @@ -33,75 +34,82 @@ class Annotation /** * Phalcon\Annotations\Annotation constructor * - * @param array $reflectionData + * @param array $reflectionData */ public function __construct(array $reflectionData) {} /** * Returns the annotation's name * - * @return string + * @return string */ public function getName() {} /** * Resolves an annotation expression * - * @param array $expr - * @return mixed + * + * @param array $expr + * @return mixed */ public function getExpression(array $expr) {} /** * Returns the expression arguments without resolving * - * @return array + * + * @return array */ public function getExprArguments() {} /** * Returns the expression arguments * - * @return array + * + * @return array */ public function getArguments() {} /** * Returns the number of arguments that the annotation has * - * @return int + * @return int */ public function numberArguments() {} /** * Returns an argument in a specific position * - * @param int|string $position - * @return mixed + * + * @param int|string $position + * @return mixed */ public function getArgument($position) {} /** * Returns an argument in a specific position * - * @param int|string $position - * @return boolean + * + * @param int|string $position + * @return bool */ public function hasArgument($position) {} /** * Returns a named argument * - * @param string $name - * @return mixed + * + * @param string $name + * @return mixed */ public function getNamedArgument($name) {} /** * Returns a named parameter * - * @param string $name - * @return mixed + * + * @param string $name + * @return mixed */ public function getNamedParameter($name) {} diff --git a/ide/stubs/Phalcon/annotations/Collection.php b/ide/stubs/Phalcon/annotations/Collection.php index 64ca9a7e2..132b7d81f 100644 --- a/ide/stubs/Phalcon/annotations/Collection.php +++ b/ide/stubs/Phalcon/annotations/Collection.php @@ -4,14 +4,18 @@ /** * Phalcon\Annotations\Collection + * * Represents a collection of annotations. This class allows to traverse a group of annotations easily + * * * //Traverse annotations * foreach ($classAnnotations as $annotation) { - * echo "Name=", $annotation->getName(), PHP_EOL; + * echo "Name=", $annotation->getName(), PHP_EOL; * } + * * //Check if the annotations has a specific * var_dump($classAnnotations->has("Cacheable")); + * * //Get an specific annotation in the collection * $annotation = $classAnnotations->get("Cacheable"); * @@ -28,14 +32,15 @@ class Collection implements \Iterator, \Countable /** * Phalcon\Annotations\Collection constructor * - * @param array $reflectionData + * + * @param array $reflectionData */ public function __construct($reflectionData = null) {} /** * Returns the number of annotations in the collection * - * @return int + * @return int */ public function count() {} @@ -47,14 +52,15 @@ public function rewind() {} /** * Returns the current annotation in the iterator * - * @return \Phalcon\Annotations\Annotation + * + * @return bool|\Phalcon\Annotations\Annotation */ public function current() {} /** * Returns the current position/key in the iterator * - * @return int + * @return int */ public function key() {} @@ -66,38 +72,38 @@ public function next() {} /** * Check if the current annotation in the iterator is valid * - * @return bool + * @return bool */ public function valid() {} /** * Returns the internal annotations as an array * - * @return Annotation[] + * @return \Phalcon\Annotations\Annotation[] */ public function getAnnotations() {} /** * Returns the first annotation that match a name * - * @param string $name - * @return \Phalcon\Annotations\Annotation + * @param string $name + * @return \Phalcon\Annotations\Annotation */ public function get($name) {} /** * Returns all the annotations that match a name * - * @param string $name - * @return Annotation[] + * @param string $name + * @return \Phalcon\Annotations\Annotation[] */ public function getAll($name) {} /** * Check if an annotation exists in a collection * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function has($name) {} diff --git a/ide/stubs/Phalcon/annotations/Reader.php b/ide/stubs/Phalcon/annotations/Reader.php index 5094e7350..3208daf99 100644 --- a/ide/stubs/Phalcon/annotations/Reader.php +++ b/ide/stubs/Phalcon/annotations/Reader.php @@ -4,6 +4,7 @@ /** * Phalcon\Annotations\Reader + * * Parses docblocks returning an array with the found annotations */ class Reader implements \Phalcon\Annotations\ReaderInterface @@ -12,18 +13,18 @@ class Reader implements \Phalcon\Annotations\ReaderInterface /** * Reads annotations from the class dockblocks, its methods and/or properties * - * @param string $className - * @return array + * @param string $className + * @return array */ public function parse($className) {} /** * Parses a raw doc block returning the annotations found * - * @param string $docBlock - * @param mixed $file - * @param mixed $line - * @return array + * @param string $docBlock + * @param mixed $file + * @param mixed $line + * @return array */ public static function parseDocBlock($docBlock, $file = null, $line = null) {} diff --git a/ide/stubs/Phalcon/annotations/ReaderInterface.php b/ide/stubs/Phalcon/annotations/ReaderInterface.php index a57996185..1e6ce9466 100644 --- a/ide/stubs/Phalcon/annotations/ReaderInterface.php +++ b/ide/stubs/Phalcon/annotations/ReaderInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Annotations\Reader + * * Parses docblocks returning an array with the found annotations */ interface ReaderInterface @@ -12,18 +13,18 @@ interface ReaderInterface /** * Reads annotations from the class dockblocks, its methods and/or properties * - * @param string $className - * @return array + * @param string $className + * @return array */ public function parse($className); /** * Parses a raw doc block returning the annotations found * - * @param string $docBlock - * @param mixed $file - * @param mixed $line - * @return array + * @param string $docBlock + * @param mixed $file + * @param mixed $line + * @return array */ public static function parseDocBlock($docBlock, $file = null, $line = null); diff --git a/ide/stubs/Phalcon/annotations/Reflection.php b/ide/stubs/Phalcon/annotations/Reflection.php index d4525eb88..480739d64 100644 --- a/ide/stubs/Phalcon/annotations/Reflection.php +++ b/ide/stubs/Phalcon/annotations/Reflection.php @@ -4,15 +4,20 @@ /** * Phalcon\Annotations\Reflection + * * Allows to manipulate the annotations reflection in an OO manner + * * * use Phalcon\Annotations\Reader; * use Phalcon\Annotations\Reflection; + * * // Parse the annotations in a class * $reader = new Reader(); * $parsing = $reader->parse("MyComponent"); + * * // Create the reflection * $reflection = new Reflection($parsing); + * * // Get the annotations in the class docblock * $classAnnotations = $reflection->getClassAnnotations(); * @@ -35,43 +40,46 @@ class Reflection /** * Phalcon\Annotations\Reflection constructor * - * @param array $reflectionData + * + * @param array $reflectionData */ public function __construct($reflectionData = null) {} /** * Returns the annotations found in the class docblock * - * @return bool|\Phalcon\Annotations\Collection + * @return bool|\Phalcon\Annotations\Collection */ public function getClassAnnotations() {} /** * Returns the annotations found in the methods' docblocks * - * @return bool|Collection[] + * @return bool|\Phalcon\Annotations\Collection[] */ public function getMethodsAnnotations() {} /** * Returns the annotations found in the properties' docblocks * - * @return bool|Collection[] + * @return bool|\Phalcon\Annotations\Collection[] */ public function getPropertiesAnnotations() {} /** * Returns the raw parsing intermediate definitions used to construct the reflection * - * @return array + * + * @return array */ public function getReflectionData() {} /** * Restores the state of a Phalcon\Annotations\Reflection variable export * - * @param mixed $data - * @return array + * + * @param mixed $data + * @return Reflection */ public static function __set_state($data) {} diff --git a/ide/stubs/Phalcon/annotations/adapter/Apc.php b/ide/stubs/Phalcon/annotations/adapter/Apc.php index 281cb9cbd..46ba28adf 100644 --- a/ide/stubs/Phalcon/annotations/adapter/Apc.php +++ b/ide/stubs/Phalcon/annotations/adapter/Apc.php @@ -4,7 +4,9 @@ /** * Phalcon\Annotations\Adapter\Apc + * * Stores the parsed annotations in APC. This adapter is suitable for production + * * * $annotations = new \Phalcon\Annotations\Adapter\Apc(); * @@ -21,23 +23,25 @@ class Apc extends \Phalcon\Annotations\Adapter /** * Phalcon\Annotations\Adapter\Apc constructor * - * @param array $options + * + * @param array $options */ public function __construct($options = null) {} /** * Reads parsed annotations from APC * - * @param string $key - * @return \Phalcon\Annotations\Reflection + * + * @param string $key + * @return bool|\Phalcon\Annotations\Reflection */ public function read($key) {} /** * Writes parsed annotations to APC * - * @param string $key - * @param mixed $data + * @param string $key + * @param \Phalcon\Annotations\Reflection $data */ public function write($key, \Phalcon\Annotations\Reflection $data) {} diff --git a/ide/stubs/Phalcon/annotations/adapter/Files.php b/ide/stubs/Phalcon/annotations/adapter/Files.php index 413b42a3a..583219e50 100644 --- a/ide/stubs/Phalcon/annotations/adapter/Files.php +++ b/ide/stubs/Phalcon/annotations/adapter/Files.php @@ -4,13 +4,16 @@ /** * Phalcon\Annotations\Adapter\Files + * * Stores the parsed annotations in files. This adapter is suitable for production + * * * use Phalcon\Annotations\Adapter\Files; + * * $annotations = new Files( - * [ - * "annotationsDir" => "app/cache/annotations/", - * ] + * [ + * "annotationsDir" => "app/cache/annotations/", + * ] * ); * */ @@ -23,23 +26,25 @@ class Files extends \Phalcon\Annotations\Adapter /** * Phalcon\Annotations\Adapter\Files constructor * - * @param array $options + * + * @param array $options */ public function __construct($options = null) {} /** * Reads parsed annotations from files * - * @param string $key - * @return \Phalcon\Annotations\Reflection + * + * @param string $key + * @return bool|int|\Phalcon\Annotations\Reflection */ public function read($key) {} /** * Writes parsed annotations to files * - * @param string $key - * @param mixed $data + * @param string $key + * @param \Phalcon\Annotations\Reflection $data */ public function write($key, \Phalcon\Annotations\Reflection $data) {} diff --git a/ide/stubs/Phalcon/annotations/adapter/Memory.php b/ide/stubs/Phalcon/annotations/adapter/Memory.php index 2a77c08c7..0cfdb18a5 100644 --- a/ide/stubs/Phalcon/annotations/adapter/Memory.php +++ b/ide/stubs/Phalcon/annotations/adapter/Memory.php @@ -4,6 +4,7 @@ /** * Phalcon\Annotations\Adapter\Memory + * * Stores the parsed annotations in memory. This adapter is the suitable development/testing */ class Memory extends \Phalcon\Annotations\Adapter @@ -19,16 +20,17 @@ class Memory extends \Phalcon\Annotations\Adapter /** * Reads parsed annotations from memory * - * @param string $key - * @return \Phalcon\Annotations\Reflection + * + * @param string $key + * @return bool|\Phalcon\Annotations\Reflection */ public function read($key) {} /** * Writes parsed annotations to memory * - * @param string $key - * @param mixed $data + * @param string $key + * @param \Phalcon\Annotations\Reflection $data */ public function write($key, \Phalcon\Annotations\Reflection $data) {} diff --git a/ide/stubs/Phalcon/annotations/adapter/Xcache.php b/ide/stubs/Phalcon/annotations/adapter/Xcache.php index 675ed0728..a8a798781 100644 --- a/ide/stubs/Phalcon/annotations/adapter/Xcache.php +++ b/ide/stubs/Phalcon/annotations/adapter/Xcache.php @@ -4,7 +4,9 @@ /** * Phalcon\Annotations\Adapter\Xcache + * * Stores the parsed annotations to XCache. This adapter is suitable for production + * * * $annotations = new \Phalcon\Annotations\Adapter\Xcache(); * @@ -15,16 +17,17 @@ class Xcache extends \Phalcon\Annotations\Adapter /** * Reads parsed annotations from XCache * - * @param string $key - * @return \Phalcon\Annotations\Reflection + * + * @param string $key + * @return bool|\Phalcon\Annotations\Reflection */ public function read($key) {} /** * Writes parsed annotations to XCache * - * @param string $key - * @param mixed $data + * @param string $key + * @param \Phalcon\Annotations\Reflection $data */ public function write($key, \Phalcon\Annotations\Reflection $data) {} diff --git a/ide/stubs/Phalcon/application/Exception.php b/ide/stubs/Phalcon/application/Exception.php index 2c2303437..f400d62a6 100644 --- a/ide/stubs/Phalcon/application/Exception.php +++ b/ide/stubs/Phalcon/application/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Application\Exception + * * Exceptions thrown in Phalcon\Application class will use this class */ class Exception extends \Phalcon\Exception diff --git a/ide/stubs/Phalcon/assets/Collection.php b/ide/stubs/Phalcon/assets/Collection.php index 50316dcdd..45b2dd328 100644 --- a/ide/stubs/Phalcon/assets/Collection.php +++ b/ide/stubs/Phalcon/assets/Collection.php @@ -4,6 +4,7 @@ /** * Phalcon\Assets\Collection + * * Represents a collection of resources */ class Collection implements \Countable, \Iterator @@ -84,65 +85,66 @@ public function getSourcePath() {} /** * Adds a resource to the collection * - * @param mixed $resource - * @return Collection + * @param \Phalcon\Assets\Resource $resource + * @return Collection */ public function add(\Phalcon\Assets\Resource $resource) {} /** * Adds an inline code to the collection * - * @param mixed $code - * @return Collection + * @param \Phalcon\Assets\Inline $code + * @return Collection */ public function addInline(\Phalcon\Assets\Inline $code) {} /** * Adds a CSS resource to the collection * - * @param string $path - * @param mixed $local - * @param bool $filter - * @param mixed $attributes - * @return Collection + * @param string $path + * @param mixed $local + * @param bool $filter + * @param mixed $attributes + * @return Collection */ public function addCss($path, $local = null, $filter = true, $attributes = null) {} /** * Adds an inline CSS to the collection * - * @param string $content - * @param bool $filter - * @param mixed $attributes - * @return Collection + * @param string $content + * @param bool $filter + * @param mixed $attributes + * @return Collection */ public function addInlineCss($content, $filter = true, $attributes = null) {} /** * Adds a javascript resource to the collection * - * @param string $path - * @param boolean $local - * @param boolean $filter - * @param array $attributes - * @return \Phalcon\Assets\Collection + * + * @param string $path + * @param boolean $local + * @param boolean $filter + * @param array $attributes + * @return Collection */ public function addJs($path, $local = null, $filter = true, $attributes = null) {} /** * Adds an inline javascript to the collection * - * @param string $content - * @param bool $filter - * @param mixed $attributes - * @return Collection + * @param string $content + * @param bool $filter + * @param mixed $attributes + * @return Collection */ public function addInlineJs($content, $filter = true, $attributes = null) {} /** * Returns the number of elements in the form * - * @return int + * @return int */ public function count() {} @@ -154,14 +156,15 @@ public function rewind() {} /** * Returns the current resource in the iterator * - * @return \Phalcon\Assets\Resource + * @return \Phalcon\Assets\Resource */ public function current() {} /** * Returns the current position/key in the iterator * - * @return int + * + * @return int */ public function key() {} @@ -173,95 +176,95 @@ public function next() {} /** * Check if the current element in the iterator is valid * - * @return bool + * @return bool */ public function valid() {} /** * Sets the target path of the file for the filtered/join output * - * @param string $targetPath - * @return Collection + * @param string $targetPath + * @return Collection */ public function setTargetPath($targetPath) {} /** * Sets a base source path for all the resources in this collection * - * @param string $sourcePath - * @return Collection + * @param string $sourcePath + * @return Collection */ public function setSourcePath($sourcePath) {} /** * Sets a target uri for the generated HTML * - * @param string $targetUri - * @return Collection + * @param string $targetUri + * @return Collection */ public function setTargetUri($targetUri) {} /** * Sets a common prefix for all the resources * - * @param string $prefix - * @return Collection + * @param string $prefix + * @return Collection */ public function setPrefix($prefix) {} /** * Sets if the collection uses local resources by default * - * @param bool $local - * @return Collection + * @param bool $local + * @return Collection */ public function setLocal($local) {} /** * Sets extra HTML attributes * - * @param array $attributes - * @return Collection + * @param array $attributes + * @return Collection */ public function setAttributes(array $attributes) {} /** * Sets an array of filters in the collection * - * @param array $filters - * @return Collection + * @param array $filters + * @return Collection */ public function setFilters(array $filters) {} /** * Sets the target local * - * @param bool $targetLocal - * @return Collection + * @param bool $targetLocal + * @return Collection */ public function setTargetLocal($targetLocal) {} /** * Sets if all filtered resources in the collection must be joined in a single result file * - * @param bool $join - * @return Collection + * @param bool $join + * @return Collection */ public function join($join) {} /** * Returns the complete location where the joined/filtered collection must be written * - * @param string $basePath - * @return string + * @param string $basePath + * @return string */ public function getRealTargetPath($basePath) {} /** * Adds a filter to the collection * - * @param mixed $filter - * @return Collection + * @param \Phalcon\Assets\FilterInterface $filter + * @return Collection */ public function addFilter(\Phalcon\Assets\FilterInterface $filter) {} diff --git a/ide/stubs/Phalcon/assets/Exception.php b/ide/stubs/Phalcon/assets/Exception.php index 316b6e4a7..d39d0464f 100644 --- a/ide/stubs/Phalcon/assets/Exception.php +++ b/ide/stubs/Phalcon/assets/Exception.php @@ -4,7 +4,9 @@ /** * Phalcon\Assets\Exception + * * Exceptions thrown in Phalcon\Assets will use this class + * */ class Exception extends \Phalcon\Exception { diff --git a/ide/stubs/Phalcon/assets/FilterInterface.php b/ide/stubs/Phalcon/assets/FilterInterface.php index f871bfa0f..4d1d4911e 100644 --- a/ide/stubs/Phalcon/assets/FilterInterface.php +++ b/ide/stubs/Phalcon/assets/FilterInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Assets\FilterInterface + * * Interface for custom Phalcon\Assets filters */ interface FilterInterface @@ -12,8 +13,8 @@ interface FilterInterface /** * Filters the content returning a string with the filtered content * - * @param string $content - * @return string + * @param string $content + * @return string */ public function filter($content); diff --git a/ide/stubs/Phalcon/assets/Inline.php b/ide/stubs/Phalcon/assets/Inline.php index 8ce195ab5..8cd8b8024 100644 --- a/ide/stubs/Phalcon/assets/Inline.php +++ b/ide/stubs/Phalcon/assets/Inline.php @@ -4,7 +4,9 @@ /** * Phalcon\Assets\Inline + * * Represents an inline asset + * * * $inline = new \Phalcon\Assets\Inline("js", "alert('hello world');"); * @@ -39,34 +41,35 @@ public function getAttributes() {} /** * Phalcon\Assets\Inline constructor * - * @param string $type - * @param string $content - * @param boolean $filter - * @param array $attributes + * + * @param string $type + * @param string $content + * @param boolean $filter + * @param array $attributes */ public function __construct($type, $content, $filter = true, $attributes = null) {} /** * Sets the inline's type * - * @param string $type - * @return Inline + * @param string $type + * @return Inline */ public function setType($type) {} /** * Sets if the resource must be filtered or not * - * @param bool $filter - * @return Inline + * @param bool $filter + * @return Inline */ public function setFilter($filter) {} /** * Sets extra HTML attributes * - * @param array $attributes - * @return Inline + * @param array $attributes + * @return Inline */ public function setAttributes(array $attributes) {} diff --git a/ide/stubs/Phalcon/assets/Manager.php b/ide/stubs/Phalcon/assets/Manager.php index 5d67e7580..993014e08 100644 --- a/ide/stubs/Phalcon/assets/Manager.php +++ b/ide/stubs/Phalcon/assets/Manager.php @@ -4,6 +4,7 @@ /** * Phalcon\Assets\Manager + * * Manages collections of CSS/Javascript assets */ class Manager @@ -25,235 +26,248 @@ class Manager /** * Phalcon\Assets\Manager * - * @param array $options + * + * @param array $options */ public function __construct($options = null) {} /** * Sets the manager options * - * @param array $options - * @return Manager + * @param array $options + * @return Manager */ public function setOptions(array $options) {} /** * Returns the manager options * - * @return array + * @return array */ public function getOptions() {} /** * Sets if the HTML generated must be directly printed or returned * - * @param bool $implicitOutput - * @return Manager + * @param bool $implicitOutput + * @return Manager */ public function useImplicitOutput($implicitOutput) {} /** * Adds a Css resource to the 'css' collection + * * * $assets->addCss("css/bootstrap.css"); * $assets->addCss("http://bootstrap.my-cdn.com/style.css", false); * * - * @param string $path - * @param mixed $local - * @param mixed $filter - * @param mixed $attributes - * @return Manager + * @param string $path + * @param mixed $local + * @param mixed $filter + * @param mixed $attributes + * @return Manager */ public function addCss($path, $local = true, $filter = true, $attributes = null) {} /** * Adds an inline Css to the 'css' collection * - * @param string $content - * @param mixed $filter - * @param mixed $attributes - * @return Manager + * @param string $content + * @param mixed $filter + * @param mixed $attributes + * @return Manager */ public function addInlineCss($content, $filter = true, $attributes = null) {} /** * Adds a javascript resource to the 'js' collection + * * * $assets->addJs("scripts/jquery.js"); * $assets->addJs("http://jquery.my-cdn.com/jquery.js", false); * * - * @param string $path - * @param mixed $local - * @param mixed $filter - * @param mixed $attributes - * @return Manager + * @param string $path + * @param mixed $local + * @param mixed $filter + * @param mixed $attributes + * @return Manager */ public function addJs($path, $local = true, $filter = true, $attributes = null) {} /** * Adds an inline javascript to the 'js' collection * - * @param string $content - * @param mixed $filter - * @param mixed $attributes - * @return Manager + * @param string $content + * @param mixed $filter + * @param mixed $attributes + * @return Manager */ public function addInlineJs($content, $filter = true, $attributes = null) {} /** * Adds a resource by its type + * * * $assets->addResourceByType("css", - * new \Phalcon\Assets\Resource\Css("css/style.css") + * new \Phalcon\Assets\Resource\Css("css/style.css") * ); * * - * @param string $type - * @param mixed $resource - * @return Manager + * @param string $type + * @param \Phalcon\Assets\Resource $resource + * @return Manager */ public function addResourceByType($type, \Phalcon\Assets\Resource $resource) {} /** * Adds an inline code by its type * - * @param string $type - * @param mixed $code - * @return Manager + * @param string $type + * @param Inline $code + * @return Manager */ public function addInlineCodeByType($type, Inline $code) {} /** * Adds a raw resource to the manager + * * * $assets->addResource( - * new Phalcon\Assets\Resource("css", "css/style.css") + * new Phalcon\Assets\Resource("css", "css/style.css") * ); * * - * @param mixed $resource - * @return Manager + * @param \Phalcon\Assets\Resource $resource + * @return Manager */ public function addResource(\Phalcon\Assets\Resource $resource) {} /** * Adds a raw inline code to the manager * - * @param mixed $code - * @return Manager + * @param Inline $code + * @return Manager */ public function addInlineCode(Inline $code) {} /** * Sets a collection in the Assets Manager + * * * $assets->set("js", $collection); * * - * @param string $id - * @param mixed $collection - * @return Manager + * @param string $id + * @param \Phalcon\Assets\Collection $collection + * @return Manager */ public function set($id, \Phalcon\Assets\Collection $collection) {} /** * Returns a collection by its id + * * * $scripts = $assets->get("js"); * * - * @param string $id - * @return \Phalcon\Assets\Collection + * @param string $id + * @return \Phalcon\Assets\Collection */ public function get($id) {} /** * Returns the CSS collection of assets * - * @return \Phalcon\Assets\Collection + * @return \Phalcon\Assets\Collection */ public function getCss() {} /** * Returns the CSS collection of assets * - * @return \Phalcon\Assets\Collection + * @return \Phalcon\Assets\Collection */ public function getJs() {} /** * Creates/Returns a collection of resources * - * @param string $name - * @return \Phalcon\Assets\Collection + * @param string $name + * @return \Phalcon\Assets\Collection */ public function collection($name) {} /** * Traverses a collection calling the callback to generate its HTML * - * @param \Phalcon\Assets\Collection $collection - * @param callback $callback - * @param string $type - * @return string|null + * + * @param \Phalcon\Assets\Collection $collection + * @param callback $callback + * @param string $type + * @return string|null */ public function output(\Phalcon\Assets\Collection $collection, $callback, $type) {} /** * Traverses a collection and generate its HTML * - * @param \Phalcon\Assets\Collection $collection - * @param string $type - * @return string + * + * @param \Phalcon\Assets\Collection $collection + * @param string $type + * @return string */ public function outputInline(\Phalcon\Assets\Collection $collection, $type) {} /** * Prints the HTML for CSS resources * - * @param string $collectionName - * @return string + * + * @param string $collectionName + * @return string */ public function outputCss($collectionName = null) {} /** * Prints the HTML for inline CSS * - * @param string $collectionName - * @return string + * + * @param string $collectionName + * @return string */ public function outputInlineCss($collectionName = null) {} /** * Prints the HTML for JS resources * - * @param string $collectionName - * @return string + * + * @param string $collectionName + * @return string */ public function outputJs($collectionName = null) {} /** * Prints the HTML for inline JS * - * @param string $collectionName - * @return string + * + * @param string $collectionName + * @return string */ public function outputInlineJs($collectionName = null) {} /** * Returns existing collections in the manager * - * @return Collection[] + * @return \Phalcon\Assets\Collection[] */ public function getCollections() {} /** * Returns true or false if collection exists * - * @param string $id - * @return bool + * @param string $id + * @return bool */ public function exists($id) {} diff --git a/ide/stubs/Phalcon/assets/Resource.php b/ide/stubs/Phalcon/assets/Resource.php index 86900ad52..ad3c32bf2 100644 --- a/ide/stubs/Phalcon/assets/Resource.php +++ b/ide/stubs/Phalcon/assets/Resource.php @@ -4,7 +4,9 @@ /** * Phalcon\Assets\Resource + * * Represents an asset resource + * * * $resource = new \Phalcon\Assets\Resource("js", "javascripts/jquery.js"); * @@ -47,27 +49,27 @@ class Resource /** - * @return string + * @return string */ public function getType() {} /** - * @return string + * @return string */ public function getPath() {} /** - * @return boolean + * @return boolean */ public function getLocal() {} /** - * @return boolean + * @return boolean */ public function getFilter() {} /** - * @return array|null + * @return array|null */ public function getAttributes() {} @@ -83,75 +85,76 @@ public function getTargetUri() {} /** * Phalcon\Assets\Resource constructor * - * @param string $type - * @param string $path - * @param boolean $local - * @param boolean $filter - * @param array $attributes + * + * @param string $type + * @param string $path + * @param boolean $local + * @param boolean $filter + * @param array $attributes */ public function __construct($type, $path, $local = true, $filter = true, $attributes = null) {} /** * Sets the resource's type * - * @param string $type - * @return Resource + * @param string $type + * @return Resource */ public function setType($type) {} /** * Sets the resource's path * - * @param string $path - * @return Resource + * @param string $path + * @return Resource */ public function setPath($path) {} /** * Sets if the resource is local or external * - * @param bool $local - * @return Resource + * @param bool $local + * @return Resource */ public function setLocal($local) {} /** * Sets if the resource must be filtered or not * - * @param bool $filter - * @return Resource + * @param bool $filter + * @return Resource */ public function setFilter($filter) {} /** * Sets extra HTML attributes * - * @param array $attributes - * @return Resource + * @param array $attributes + * @return Resource */ public function setAttributes(array $attributes) {} /** * Sets a target uri for the generated HTML * - * @param string $targetUri - * @return Resource + * @param string $targetUri + * @return Resource */ public function setTargetUri($targetUri) {} /** * Sets the resource's source path * - * @param string $sourcePath - * @return Resource + * @param string $sourcePath + * @return Resource */ public function setSourcePath($sourcePath) {} /** * Sets the resource's target path * - * @param string $targetPath - * @return Resource + * @param string $targetPath + * @return Resource */ public function setTargetPath($targetPath) {} @@ -159,31 +162,31 @@ public function setTargetPath($targetPath) {} * Returns the content of the resource as an string * Optionally a base path where the resource is located can be set * - * @param string $basePath - * @return string + * @param string $basePath + * @return string */ public function getContent($basePath = null) {} /** * Returns the real target uri for the generated HTML * - * @return string + * @return string */ public function getRealTargetUri() {} /** * Returns the complete location where the resource is located * - * @param string $basePath - * @return string + * @param string $basePath + * @return string */ public function getRealSourcePath($basePath = null) {} /** * Returns the complete location where the resource must be written * - * @param string $basePath - * @return string + * @param string $basePath + * @return string */ public function getRealTargetPath($basePath = null) {} diff --git a/ide/stubs/Phalcon/assets/filters/Cssmin.php b/ide/stubs/Phalcon/assets/filters/Cssmin.php index 7071441f5..a9d92195c 100644 --- a/ide/stubs/Phalcon/assets/filters/Cssmin.php +++ b/ide/stubs/Phalcon/assets/filters/Cssmin.php @@ -4,6 +4,7 @@ /** * Phalcon\Assets\Filters\Cssmin + * * Minify the css - removes comments * removes newlines and line feeds keeping * removes last semicolon from last property @@ -14,8 +15,8 @@ class Cssmin implements \Phalcon\Assets\FilterInterface /** * Filters the content using CSSMIN * - * @param string $content - * @return string + * @param string $content + * @return string */ public function filter($content) {} diff --git a/ide/stubs/Phalcon/assets/filters/Jsmin.php b/ide/stubs/Phalcon/assets/filters/Jsmin.php index 650d4ffbe..590afbce7 100644 --- a/ide/stubs/Phalcon/assets/filters/Jsmin.php +++ b/ide/stubs/Phalcon/assets/filters/Jsmin.php @@ -4,6 +4,7 @@ /** * Phalcon\Assets\Filters\Jsmin + * * Deletes the characters which are insignificant to JavaScript. Comments will be removed. Tabs will be * replaced with spaces. Carriage returns will be replaced with linefeeds. * Most spaces and linefeeds will be removed. @@ -14,8 +15,8 @@ class Jsmin implements \Phalcon\Assets\FilterInterface /** * Filters the content using JSMIN * - * @param string $content - * @return string + * @param string $content + * @return string */ public function filter($content) {} diff --git a/ide/stubs/Phalcon/assets/filters/None.php b/ide/stubs/Phalcon/assets/filters/None.php index 287996243..066e5077f 100644 --- a/ide/stubs/Phalcon/assets/filters/None.php +++ b/ide/stubs/Phalcon/assets/filters/None.php @@ -4,6 +4,7 @@ /** * Phalcon\Assets\Filters\None + * * Returns the content without make any modification to the original source */ class None implements \Phalcon\Assets\FilterInterface @@ -12,8 +13,8 @@ class None implements \Phalcon\Assets\FilterInterface /** * Returns the content without be touched * - * @param string $content - * @return string + * @param string $content + * @return string */ public function filter($content) {} diff --git a/ide/stubs/Phalcon/assets/inline/Css.php b/ide/stubs/Phalcon/assets/inline/Css.php index 509fdc903..375531443 100644 --- a/ide/stubs/Phalcon/assets/inline/Css.php +++ b/ide/stubs/Phalcon/assets/inline/Css.php @@ -4,6 +4,7 @@ /** * Phalcon\Assets\Inline\Css + * * Represents an inlined CSS */ class Css extends \Phalcon\Assets\Inline @@ -12,9 +13,10 @@ class Css extends \Phalcon\Assets\Inline /** * Phalcon\Assets\Inline\Css * - * @param string $content - * @param boolean $filter - * @param array $attributes + * + * @param string $content + * @param boolean $filter + * @param array $attributes */ public function __construct($content, $filter = true, $attributes = null) {} diff --git a/ide/stubs/Phalcon/assets/inline/Js.php b/ide/stubs/Phalcon/assets/inline/Js.php index 9b08cec4c..4d4fd6f68 100644 --- a/ide/stubs/Phalcon/assets/inline/Js.php +++ b/ide/stubs/Phalcon/assets/inline/Js.php @@ -4,6 +4,7 @@ /** * Phalcon\Assets\Inline\Js + * * Represents an inline Javascript */ class Js extends \Phalcon\Assets\Inline @@ -12,9 +13,10 @@ class Js extends \Phalcon\Assets\Inline /** * Phalcon\Assets\Inline\Js * - * @param string $content - * @param boolean $filter - * @param array $attributes + * + * @param string $content + * @param boolean $filter + * @param array $attributes */ public function __construct($content, $filter = true, $attributes = null) {} diff --git a/ide/stubs/Phalcon/assets/resource/Css.php b/ide/stubs/Phalcon/assets/resource/Css.php index 6294e7b10..a58084687 100644 --- a/ide/stubs/Phalcon/assets/resource/Css.php +++ b/ide/stubs/Phalcon/assets/resource/Css.php @@ -4,6 +4,7 @@ /** * Phalcon\Assets\Resource\Css + * * Represents CSS resources */ class Css extends \Phalcon\Assets\Resource @@ -12,10 +13,11 @@ class Css extends \Phalcon\Assets\Resource /** * Phalcon\Assets\Resource\Css * - * @param string $path - * @param boolean $local - * @param boolean $filter - * @param array $attributes + * + * @param string $path + * @param boolean $local + * @param boolean $filter + * @param array $attributes */ public function __construct($path, $local = true, $filter = true, $attributes = null) {} diff --git a/ide/stubs/Phalcon/assets/resource/Js.php b/ide/stubs/Phalcon/assets/resource/Js.php index 4003dbf5a..e91a50a18 100644 --- a/ide/stubs/Phalcon/assets/resource/Js.php +++ b/ide/stubs/Phalcon/assets/resource/Js.php @@ -4,6 +4,7 @@ /** * Phalcon\Assets\Resource\Js + * * Represents Javascript resources */ class Js extends \Phalcon\Assets\Resource @@ -12,10 +13,11 @@ class Js extends \Phalcon\Assets\Resource /** * Phalcon\Assets\Resource\Js * - * @param string $path - * @param boolean $local - * @param boolean $filter - * @param array $attributes + * + * @param string $path + * @param boolean $local + * @param boolean $filter + * @param array $attributes */ public function __construct($path, $local = true, $filter = true, $attributes = null) {} diff --git a/ide/stubs/Phalcon/cache/Backend.php b/ide/stubs/Phalcon/cache/Backend.php index 8d5d1658a..1dce083ed 100644 --- a/ide/stubs/Phalcon/cache/Backend.php +++ b/ide/stubs/Phalcon/cache/Backend.php @@ -4,6 +4,7 @@ /** * Phalcon\Cache\Backend + * * This class implements common functionality for backend adapters. A backend cache adapter may extend this class */ abstract class Backend implements \Phalcon\Cache\BackendInterface @@ -34,7 +35,7 @@ abstract class Backend implements \Phalcon\Cache\BackendInterface public function getFrontend() {} /** - * @param mixed $frontend + * @param mixed $frontend */ public function setFrontend($frontend) {} @@ -42,7 +43,7 @@ public function setFrontend($frontend) {} public function getOptions() {} /** - * @param mixed $options + * @param mixed $options */ public function setOptions($options) {} @@ -50,52 +51,55 @@ public function setOptions($options) {} public function getLastKey() {} /** - * @param mixed $lastKey + * @param mixed $lastKey */ public function setLastKey($lastKey) {} /** * Phalcon\Cache\Backend constructor * - * @param \Phalcon\Cache\FrontendInterface $frontend - * @param array $options + * + * @param \Phalcon\Cache\FrontendInterface $frontend + * @param array $options */ public function __construct(\Phalcon\Cache\FrontendInterface $frontend, $options = null) {} /** * Starts a cache. The keyname allows to identify the created fragment * - * @param int|string $keyName - * @param int $lifetime - * @return mixed + * + * @param int|string $keyName + * @param int $lifetime + * @return mixed */ public function start($keyName, $lifetime = null) {} /** * Stops the frontend without store any cached content * - * @param bool $stopBuffer + * @param bool $stopBuffer */ public function stop($stopBuffer = true) {} /** * Checks whether the last cache is fresh or cached * - * @return bool + * @return bool */ public function isFresh() {} /** * Checks whether the cache has starting buffering or not * - * @return bool + * @return bool */ public function isStarted() {} /** * Gets the last lifetime set * - * @return int + * + * @return int */ public function getLifetime() {} diff --git a/ide/stubs/Phalcon/cache/BackendInterface.php b/ide/stubs/Phalcon/cache/BackendInterface.php index 27ea5c725..8a717935f 100644 --- a/ide/stubs/Phalcon/cache/BackendInterface.php +++ b/ide/stubs/Phalcon/cache/BackendInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Cache\BackendInterface + * * Interface for Phalcon\Cache\Backend adapters */ interface BackendInterface @@ -12,103 +13,113 @@ interface BackendInterface /** * Starts a cache. The keyname allows to identify the created fragment * - * @param int|string $keyName - * @param int $lifetime - * @return mixed + * + * @param int|string $keyName + * @param int $lifetime + * @return mixed */ public function start($keyName, $lifetime = null); /** * Stops the frontend without store any cached content * - * @param boolean $stopBuffer + * + * @param boolean $stopBuffer */ public function stop($stopBuffer = true); /** * Returns front-end instance adapter related to the back-end * - * @return mixed + * + * @return mixed */ public function getFrontend(); /** * Returns the backend options * - * @return array + * + * @return array */ public function getOptions(); /** * Checks whether the last cache is fresh or cached * - * @return bool + * @return bool */ public function isFresh(); /** * Checks whether the cache has starting buffering or not * - * @return bool + * @return bool */ public function isStarted(); /** * Sets the last key used in the cache * - * @param string $lastKey + * + * @param string $lastKey */ public function setLastKey($lastKey); /** * Gets the last key stored by the cache * - * @return string + * + * @return string */ public function getLastKey(); /** * Returns a cached content * - * @param string $keyName - * @param int $lifetime - * @return mixed|null + * @param string $keyName + * @param int $lifetime + * @return mixed|null */ public function get($keyName, $lifetime = null); /** * Stores cached content into the file backend and stops the frontend * - * @param int|string $keyName - * @param string $content - * @param int $lifetime - * @param boolean $stopBuffer - * @return bool + * + * @param int|string $keyName + * @param string $content + * @param int $lifetime + * @param boolean $stopBuffer + * @return bool */ public function save($keyName = null, $content = null, $lifetime = null, $stopBuffer = true); /** * Deletes a value from the cache by its key * - * @param int|string $keyName - * @return boolean + * + * @param int|string $keyName + * @return boolean */ public function delete($keyName); /** * Query the existing cached keys * - * @param string $prefix - * @return array + * + * @param string $prefix + * @return array */ public function queryKeys($prefix = null); /** * Checks if cache exists and it hasn't expired * - * @param string $keyName - * @param int $lifetime - * @return boolean + * + * @param string $keyName + * @param int $lifetime + * @return boolean */ public function exists($keyName = null, $lifetime = null); diff --git a/ide/stubs/Phalcon/cache/Exception.php b/ide/stubs/Phalcon/cache/Exception.php index 2b03add73..45f024399 100644 --- a/ide/stubs/Phalcon/cache/Exception.php +++ b/ide/stubs/Phalcon/cache/Exception.php @@ -4,7 +4,9 @@ /** * Phalcon\Cache\Exception + * * Exceptions thrown in Phalcon\Cache will use this class + * */ class Exception extends \Phalcon\Exception { diff --git a/ide/stubs/Phalcon/cache/FrontendInterface.php b/ide/stubs/Phalcon/cache/FrontendInterface.php index 11f96c150..74f7526dc 100644 --- a/ide/stubs/Phalcon/cache/FrontendInterface.php +++ b/ide/stubs/Phalcon/cache/FrontendInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Cache\FrontendInterface + * * Interface for Phalcon\Cache\Frontend adapters */ interface FrontendInterface @@ -12,14 +13,14 @@ interface FrontendInterface /** * Returns the cache lifetime * - * @return int + * @return int */ public function getLifetime(); /** * Check whether if frontend is buffering output * - * @return bool + * @return bool */ public function isBuffering(); @@ -31,7 +32,8 @@ public function start(); /** * Returns output cached content * - * @return string + * + * @return string */ public function getContent(); @@ -43,14 +45,16 @@ public function stop(); /** * Serializes data before storing it * - * @param mixed $data + * + * @param mixed $data */ public function beforeStore($data); /** * Unserializes data after retrieving it * - * @param mixed $data + * + * @param mixed $data */ public function afterRetrieve($data); diff --git a/ide/stubs/Phalcon/cache/Multiple.php b/ide/stubs/Phalcon/cache/Multiple.php index d23b29f23..224fde7c7 100644 --- a/ide/stubs/Phalcon/cache/Multiple.php +++ b/ide/stubs/Phalcon/cache/Multiple.php @@ -4,54 +4,61 @@ /** * Phalcon\Cache\Multiple + * * Allows to read to chained backend adapters writing to multiple backends + * * * use Phalcon\Cache\Frontend\Data as DataFrontend; * use Phalcon\Cache\Multiple; * use Phalcon\Cache\Backend\Apc as ApcCache; * use Phalcon\Cache\Backend\Memcache as MemcacheCache; * use Phalcon\Cache\Backend\File as FileCache; + * * $ultraFastFrontend = new DataFrontend( - * [ - * "lifetime" => 3600, - * ] + * [ + * "lifetime" => 3600, + * ] * ); + * * $fastFrontend = new DataFrontend( - * [ - * "lifetime" => 86400, - * ] + * [ + * "lifetime" => 86400, + * ] * ); + * * $slowFrontend = new DataFrontend( - * [ - * "lifetime" => 604800, - * ] + * [ + * "lifetime" => 604800, + * ] * ); + * * //Backends are registered from the fastest to the slower * $cache = new Multiple( - * [ - * new ApcCache( - * $ultraFastFrontend, - * [ - * "prefix" => "cache", - * ] - * ), - * new MemcacheCache( - * $fastFrontend, - * [ - * "prefix" => "cache", - * "host" => "localhost", - * "port" => "11211", - * ] - * ), - * new FileCache( - * $slowFrontend, - * [ - * "prefix" => "cache", - * "cacheDir" => "../app/cache/", - * ] - * ), - * ] + * [ + * new ApcCache( + * $ultraFastFrontend, + * [ + * "prefix" => "cache", + * ] + * ), + * new MemcacheCache( + * $fastFrontend, + * [ + * "prefix" => "cache", + * "host" => "localhost", + * "port" => "11211", + * ] + * ), + * new FileCache( + * $slowFrontend, + * [ + * "prefix" => "cache", + * "cacheDir" => "../app/cache/", + * ] + * ), + * ] * ); + * * //Save, saves in every backend * $cache->save("my-key", $data); * @@ -65,68 +72,74 @@ class Multiple /** * Phalcon\Cache\Multiple constructor * + * * @param Phalcon\Cache\BackendInterface[] backends - * @param mixed $backends + * @param mixed $backends */ public function __construct($backends = null) {} /** * Adds a backend * - * @param mixed $backend - * @return Multiple + * @param \Phalcon\Cache\BackendInterface $backend + * @return Multiple */ public function push(\Phalcon\Cache\BackendInterface $backend) {} /** * Returns a cached content reading the internal backends * - * @param mixed $keyName - * @param long $lifetime - * @param $string|int keyName - * @return mixed + * + * @param mixed $keyName + * @param long $lifetime + * @param $string|int keyName + * @return mixed */ public function get($keyName, $lifetime = null) {} /** * Starts every backend * - * @param string|int $keyName - * @param long $lifetime + * + * @param string|int $keyName + * @param long $lifetime */ public function start($keyName, $lifetime = null) {} /** * Stores cached content into all backends and stops the frontend * - * @param string $keyName - * @param string $content - * @param long $lifetime - * @param boolean $stopBuffer + * + * @param string $keyName + * @param string $content + * @param long $lifetime + * @param boolean $stopBuffer */ public function save($keyName = null, $content = null, $lifetime = null, $stopBuffer = null) {} /** * Deletes a value from each backend * - * @param string|int $keyName - * @return boolean + * + * @param string|int $keyName + * @return bool */ public function delete($keyName) {} /** * Checks if cache exists in at least one backend * - * @param string|int $keyName - * @param long $lifetime - * @return boolean + * + * @param string|int $keyName + * @param long $lifetime + * @return bool */ public function exists($keyName = null, $lifetime = null) {} /** * Flush all backend(s) * - * @return bool + * @return bool */ public function flush() {} diff --git a/ide/stubs/Phalcon/cache/backend/Apc.php b/ide/stubs/Phalcon/cache/backend/Apc.php index 0671de756..6c06b456d 100644 --- a/ide/stubs/Phalcon/cache/backend/Apc.php +++ b/ide/stubs/Phalcon/cache/backend/Apc.php @@ -4,24 +4,30 @@ /** * Phalcon\Cache\Backend\Apc + * * Allows to cache output fragments, PHP data and raw data using an APC backend + * * * use Phalcon\Cache\Backend\Apc; * use Phalcon\Cache\Frontend\Data as FrontData; + * * // Cache data for 2 days * $frontCache = new FrontData( - * [ - * "lifetime" => 172800, - * ] + * [ + * "lifetime" => 172800, + * ] * ); + * * $cache = new Apc( - * $frontCache, - * [ - * "prefix" => "app-data", - * ] + * $frontCache, + * [ + * "prefix" => "app-data", + * ] * ); + * * // Cache arbitrary data * $cache->save("my-data", [1, 2, 3, 4, 5]); + * * // Get data * $data = $cache->get("my-data"); * @@ -32,77 +38,86 @@ class Apc extends \Phalcon\Cache\Backend /** * Returns a cached content * - * @param string $keyName - * @param int $lifetime - * @return mixed|null + * @param string $keyName + * @param int $lifetime + * @return mixed|null */ public function get($keyName, $lifetime = null) {} /** * Stores cached content into the APC backend and stops the frontend * - * @param string|long $keyName - * @param string $content - * @param long $lifetime - * @param boolean $stopBuffer - * @return bool + * + * @param string|long $keyName + * @param string $content + * @param long $lifetime + * @param boolean $stopBuffer + * @return bool */ public function save($keyName = null, $content = null, $lifetime = null, $stopBuffer = true) {} /** * Increment of a given key, by number $value * - * @param string $keyName - * @param long $value - * @return mixed + * + * @param string $keyName + * @param long $value + * @return mixed */ public function increment($keyName = null, $value = 1) {} /** * Decrement of a given key, by number $value * - * @param string $keyName - * @param long $value - * @return mixed + * + * @param string $keyName + * @param long $value + * @return mixed */ public function decrement($keyName = null, $value = 1) {} /** * Deletes a value from the cache by its key * - * @param string $keyName - * @return bool + * @param string $keyName + * @return bool */ public function delete($keyName) {} /** * Query the existing cached keys * - * @param string $prefix - * @return array + * + * @param string $prefix + * @return array */ public function queryKeys($prefix = null) {} /** * Checks if cache exists and it hasn't expired * - * @param string|long $keyName - * @param long $lifetime - * @return boolean + * + * @param string|long $keyName + * @param long $lifetime + * @return bool */ public function exists($keyName = null, $lifetime = null) {} /** * Immediately invalidates all existing items. + * * * use Phalcon\Cache\Backend\Apc; + * * $cache = new Apc($frontCache, ["prefix" => "app-data"]); + * * $cache->save("my-data", [1, 2, 3, 4, 5]); + * * // 'my-data' and all other used keys are deleted * $cache->flush(); * * - * @return bool + * @return bool */ public function flush() {} diff --git a/ide/stubs/Phalcon/cache/backend/File.php b/ide/stubs/Phalcon/cache/backend/File.php index 8f89c7a0c..0e31190a0 100644 --- a/ide/stubs/Phalcon/cache/backend/File.php +++ b/ide/stubs/Phalcon/cache/backend/File.php @@ -4,28 +4,37 @@ /** * Phalcon\Cache\Backend\File + * * Allows to cache output fragments using a file backend + * * * use Phalcon\Cache\Backend\File; * use Phalcon\Cache\Frontend\Output as FrontOutput; + * * // Cache the file for 2 days * $frontendOptions = [ - * "lifetime" => 172800, + * "lifetime" => 172800, * ]; + * * // Create an output cache * $frontCache = FrontOutput($frontOptions); + * * // Set the cache directory * $backendOptions = [ - * "cacheDir" => "../app/cache/", + * "cacheDir" => "../app/cache/", * ]; + * * // Create the File backend * $cache = new File($frontCache, $backendOptions); + * * $content = $cache->start("my-cache"); + * * if ($content === null) { - * echo "

", time(), "

"; - * $cache->save(); + * echo "

", time(), "

"; + * + * $cache->save(); * } else { - * echo $content; + * echo $content; * } *
*/ @@ -34,6 +43,7 @@ class File extends \Phalcon\Cache\Backend /** * Default to false for backwards compatibility * + * * @var boolean */ private $_useSafeKey = false; @@ -42,94 +52,100 @@ class File extends \Phalcon\Cache\Backend /** * Phalcon\Cache\Backend\File constructor * - * @param mixed $frontend - * @param array $options + * @param \Phalcon\Cache\FrontendInterface $frontend + * @param array $options */ public function __construct(\Phalcon\Cache\FrontendInterface $frontend, array $options) {} /** * Returns a cached content * - * @param string $keyName - * @param int $lifetime - * @return mixed|null + * @param string $keyName + * @param int $lifetime + * @return mixed|null */ public function get($keyName, $lifetime = null) {} /** * Stores cached content into the file backend and stops the frontend * - * @param int|string $keyName - * @param string $content - * @param int $lifetime - * @param boolean $stopBuffer - * @return bool + * + * @param int|string $keyName + * @param string $content + * @param int $lifetime + * @param boolean $stopBuffer + * @return bool */ public function save($keyName = null, $content = null, $lifetime = null, $stopBuffer = true) {} /** * Deletes a value from the cache by its key * - * @param int|string $keyName - * @return boolean + * + * @param int|string $keyName + * @return bool */ public function delete($keyName) {} /** * Query the existing cached keys * - * @param string|int $prefix - * @return array + * + * @param string|int $prefix + * @return array */ public function queryKeys($prefix = null) {} /** * Checks if cache exists and it isn't expired * - * @param string|int $keyName - * @param int $lifetime - * @return boolean + * + * @param string|int $keyName + * @param int $lifetime + * @return bool */ public function exists($keyName = null, $lifetime = null) {} /** * Increment of a given key, by number $value * - * @param string|int $keyName - * @param int $value - * @return mixed + * + * @param string|int $keyName + * @param int $value + * @return mixed */ public function increment($keyName = null, $value = 1) {} /** * Decrement of a given key, by number $value * - * @param string|int $keyName - * @param int $value - * @return mixed + * + * @param string|int $keyName + * @param int $value + * @return mixed */ public function decrement($keyName = null, $value = 1) {} /** * Immediately invalidates all existing items. * - * @return bool + * @return bool */ public function flush() {} /** * Return a file-system safe identifier for a given key * - * @param mixed $key - * @return string + * @param mixed $key + * @return string */ public function getKey($key) {} /** * Set whether to use the safekey or not * - * @param bool $useSafeKey - * @return File + * @param bool $useSafeKey + * @return File */ public function useSafeKey($useSafeKey) {} diff --git a/ide/stubs/Phalcon/cache/backend/Libmemcached.php b/ide/stubs/Phalcon/cache/backend/Libmemcached.php index a8f3a1208..20f336f8f 100644 --- a/ide/stubs/Phalcon/cache/backend/Libmemcached.php +++ b/ide/stubs/Phalcon/cache/backend/Libmemcached.php @@ -4,36 +4,42 @@ /** * Phalcon\Cache\Backend\Libmemcached + * * Allows to cache output fragments, PHP data or raw data to a libmemcached backend. * Per default persistent memcached connection pools are used. + * * * use Phalcon\Cache\Backend\Libmemcached; * use Phalcon\Cache\Frontend\Data as FrontData; + * * // Cache data for 2 days * $frontCache = new FrontData( - * [ - * "lifetime" => 172800, - * ] + * [ + * "lifetime" => 172800, + * ] * ); + * * // Create the Cache setting memcached connection options * $cache = new Libmemcached( - * $frontCache, - * [ - * "servers" => [ - * [ - * "host" => "localhost", - * "port" => 11211, - * "weight" => 1, - * ], - * ], - * "client" => [ - * \Memcached::OPT_HASH => Memcached::HASH_MD5, - * \Memcached::OPT_PREFIX_KEY => "prefix.", - * ], - * ] + * $frontCache, + * [ + * "servers" => [ + * [ + * "host" => "localhost", + * "port" => 11211, + * "weight" => 1, + * ], + * ], + * "client" => [ + * \Memcached::OPT_HASH => Memcached::HASH_MD5, + * \Memcached::OPT_PREFIX_KEY => "prefix.", + * ], + * ] * ); + * * // Cache arbitrary data * $cache->save("my-data", [1, 2, 3, 4, 5]); + * * // Get data * $data = $cache->get("my-data"); * @@ -47,10 +53,11 @@ class Libmemcached extends \Phalcon\Cache\Backend /** * Phalcon\Cache\Backend\Memcache constructor * + * * @param Phalcon\Cache\FrontendInterface frontend * @param array options - * @param mixed $frontend - * @param mixed $options + * @param \Phalcon\Cache\FrontendInterface $frontend + * @param mixed $options */ public function __construct(\Phalcon\Cache\FrontendInterface $frontend, $options = null) {} @@ -62,84 +69,94 @@ public function _connect() {} /** * Returns a cached content * - * @param string $keyName - * @param int $lifetime - * @return mixed|null + * @param string $keyName + * @param int $lifetime + * @return mixed|null */ public function get($keyName, $lifetime = null) {} /** * Stores cached content into the file backend and stops the frontend * - * @param int|string $keyName - * @param string $content - * @param long $lifetime - * @param boolean $stopBuffer - * @return bool + * + * @param int|string $keyName + * @param string $content + * @param long $lifetime + * @param boolean $stopBuffer + * @return bool */ public function save($keyName = null, $content = null, $lifetime = null, $stopBuffer = true) {} /** * Deletes a value from the cache by its key * - * @param int|string $keyName - * @return boolean + * + * @param int|string $keyName + * @return boolean */ public function delete($keyName) {} /** * Query the existing cached keys * - * @param string $prefix - * @return array + * + * @param string $prefix + * @return array */ public function queryKeys($prefix = null) {} /** * Checks if cache exists and it isn't expired * - * @param string $keyName - * @param long $lifetime - * @return boolean + * + * @param string $keyName + * @param long $lifetime + * @return bool */ public function exists($keyName = null, $lifetime = null) {} /** * Increment of given $keyName by $value * - * @param string $keyName - * @param mixed $value - * @param long $lifetime - * @return long + * + * @param string $keyName + * @param mixed $value + * @param long $lifetime + * @return long */ public function increment($keyName = null, $value = null) {} /** * Decrement of $keyName by given $value * - * @param string $keyName - * @param long $value - * @return long + * + * @param string $keyName + * @param long $value + * @return long */ public function decrement($keyName = null, $value = null) {} /** * Immediately invalidates all existing items. + * * Memcached does not support flush() per default. If you require flush() support, set $config["statsKey"]. * All modified keys are stored in "statsKey". Note: statsKey has a negative performance impact. + * * * $cache = new \Phalcon\Cache\Backend\Libmemcached( - * $frontCache, - * [ - * "statsKey" => "_PHCM", - * ] + * $frontCache, + * [ + * "statsKey" => "_PHCM", + * ] * ); + * * $cache->save("my-data", [1, 2, 3, 4, 5]); + * * // 'my-data' and all other used keys are deleted * $cache->flush(); * * - * @return bool + * @return bool */ public function flush() {} diff --git a/ide/stubs/Phalcon/cache/backend/Memcache.php b/ide/stubs/Phalcon/cache/backend/Memcache.php index ba101f771..48f49bfaa 100644 --- a/ide/stubs/Phalcon/cache/backend/Memcache.php +++ b/ide/stubs/Phalcon/cache/backend/Memcache.php @@ -4,28 +4,35 @@ /** * Phalcon\Cache\Backend\Memcache + * * Allows to cache output fragments, PHP data or raw data to a memcache backend + * * This adapter uses the special memcached key "_PHCM" to store all the keys internally used by the adapter + * * * use Phalcon\Cache\Backend\Memcache; * use Phalcon\Cache\Frontend\Data as FrontData; + * * // Cache data for 2 days * $frontCache = new FrontData( - * [ - * "lifetime" => 172800, - * ] + * [ + * "lifetime" => 172800, + * ] * ); + * * // Create the Cache setting memcached connection options * $cache = new Memcache( - * $frontCache, - * [ - * "host" => "localhost", - * "port" => 11211, - * "persistent" => false, - * ] + * $frontCache, + * [ + * "host" => "localhost", + * "port" => 11211, + * "persistent" => false, + * ] * ); + * * // Cache arbitrary data * $cache->save("my-data", [1, 2, 3, 4, 5]); + * * // Get data * $data = $cache->get("my-data"); * @@ -39,10 +46,11 @@ class Memcache extends \Phalcon\Cache\Backend /** * Phalcon\Cache\Backend\Memcache constructor * + * * @param Phalcon\Cache\FrontendInterface frontend * @param array options - * @param mixed $frontend - * @param mixed $options + * @param \Phalcon\Cache\FrontendInterface $frontend + * @param mixed $options */ public function __construct(\Phalcon\Cache\FrontendInterface $frontend, $options = null) {} @@ -54,80 +62,86 @@ public function _connect() {} /** * Add servers to memcache pool * - * @param string $host - * @param int $port - * @param bool $persistent - * @return bool + * @param string $host + * @param int $port + * @param bool $persistent + * @return bool */ public function addServers($host, $port, $persistent = false) {} /** * Returns a cached content * - * @param string $keyName - * @param int $lifetime - * @return mixed|null + * @param string $keyName + * @param int $lifetime + * @return mixed|null */ public function get($keyName, $lifetime = null) {} /** * Stores cached content into the file backend and stops the frontend * - * @param int|string $keyName - * @param string $content - * @param long $lifetime - * @param boolean $stopBuffer - * @return bool + * + * @param int|string $keyName + * @param string $content + * @param long $lifetime + * @param boolean $stopBuffer + * @return bool */ public function save($keyName = null, $content = null, $lifetime = null, $stopBuffer = true) {} /** * Deletes a value from the cache by its key * - * @param int|string $keyName - * @return boolean + * + * @param int|string $keyName + * @return boolean */ public function delete($keyName) {} /** * Query the existing cached keys * - * @param string $prefix - * @return array + * + * @param string $prefix + * @return array */ public function queryKeys($prefix = null) {} /** * Checks if cache exists and it isn't expired * - * @param string $keyName - * @param long $lifetime - * @return boolean + * + * @param string $keyName + * @param long $lifetime + * @return bool */ public function exists($keyName = null, $lifetime = null) {} /** * Increment of given $keyName by $value * - * @param string $keyName - * @param long $value - * @return long + * + * @param string $keyName + * @param long $value + * @return long */ public function increment($keyName = null, $value = null) {} /** * Decrement of $keyName by given $value * - * @param string $keyName - * @param long $value - * @return long + * + * @param string $keyName + * @param long $value + * @return long */ public function decrement($keyName = null, $value = null) {} /** * Immediately invalidates all existing items. * - * @return bool + * @return bool */ public function flush() {} diff --git a/ide/stubs/Phalcon/cache/backend/Memory.php b/ide/stubs/Phalcon/cache/backend/Memory.php index 8d1e81cfd..26f2486d1 100644 --- a/ide/stubs/Phalcon/cache/backend/Memory.php +++ b/ide/stubs/Phalcon/cache/backend/Memory.php @@ -4,15 +4,21 @@ /** * Phalcon\Cache\Backend\Memory + * * Stores content in memory. Data is lost when the request is finished + * * * use Phalcon\Cache\Backend\Memory; * use Phalcon\Cache\Frontend\Data as FrontData; + * * // Cache data * $frontCache = new FrontData(); + * * $cache = new Memory($frontCache); + * * // Cache arbitrary data * $cache->save("my-data", [1, 2, 3, 4, 5]); + * * // Get data * $data = $cache->get("my-data"); * @@ -26,85 +32,91 @@ class Memory extends \Phalcon\Cache\Backend implements \Serializable /** * Returns a cached content * - * @param string $keyName - * @param int $lifetime - * @return mixed|null + * @param string $keyName + * @param int $lifetime + * @return mixed|null */ public function get($keyName, $lifetime = null) {} /** * Stores cached content into the backend and stops the frontend * - * @param string $keyName - * @param string $content - * @param long $lifetime - * @param boolean $stopBuffer - * @return bool + * + * @param string $keyName + * @param string $content + * @param long $lifetime + * @param boolean $stopBuffer + * @return bool */ public function save($keyName = null, $content = null, $lifetime = null, $stopBuffer = true) {} /** * Deletes a value from the cache by its key * - * @param string $keyName - * @return boolean + * + * @param string $keyName + * @return bool */ public function delete($keyName) {} /** * Query the existing cached keys * - * @param string|int $prefix - * @return array + * + * @param string|int $prefix + * @return array */ public function queryKeys($prefix = null) {} /** * Checks if cache exists and it hasn't expired * - * @param string|int $keyName - * @param long $lifetime - * @return boolean + * + * @param string|int $keyName + * @param long $lifetime + * @return bool */ public function exists($keyName = null, $lifetime = null) {} /** * Increment of given $keyName by $value * - * @param string $keyName - * @param mixed $value - * @param long $lifetime - * @return int|null + * + * @param string $keyName + * @param mixed $value + * @param long $lifetime + * @return int|null */ public function increment($keyName = null, $value = null) {} /** * Decrement of $keyName by given $value * - * @param string $keyName - * @param long $value - * @return int|null + * + * @param string $keyName + * @param long $value + * @return int|null */ public function decrement($keyName = null, $value = null) {} /** * Immediately invalidates all existing items. * - * @return bool + * @return bool */ public function flush() {} /** * Required for interface \Serializable * - * @return string + * @return string */ public function serialize() {} /** * Required for interface \Serializable * - * @param mixed $data + * @param mixed $data */ public function unserialize($data) {} diff --git a/ide/stubs/Phalcon/cache/backend/Mongo.php b/ide/stubs/Phalcon/cache/backend/Mongo.php index ee4422872..d37bd0084 100644 --- a/ide/stubs/Phalcon/cache/backend/Mongo.php +++ b/ide/stubs/Phalcon/cache/backend/Mongo.php @@ -4,30 +4,36 @@ /** * Phalcon\Cache\Backend\Mongo + * * Allows to cache output fragments, PHP data or raw data to a MongoDb backend + * * * use Phalcon\Cache\Backend\Mongo; * use Phalcon\Cache\Frontend\Base64; + * * // Cache data for 2 days * $frontCache = new Base64( - * [ - * "lifetime" => 172800, - * ] + * [ + * "lifetime" => 172800, + * ] * ); + * * // Create a MongoDB cache * $cache = new Mongo( - * $frontCache, - * [ - * "server" => "mongodb://localhost", - * "db" => "caches", - * "collection" => "images", - * ] + * $frontCache, + * [ + * "server" => "mongodb://localhost", + * "db" => "caches", + * "collection" => "images", + * ] * ); + * * // Cache arbitrary data * $cache->save( - * "my-data", - * file_get_contents("some-image.jpg") + * "my-data", + * file_get_contents("some-image.jpg") * ); + * * // Get data * $data = $cache->get("my-data"); * @@ -41,94 +47,102 @@ class Mongo extends \Phalcon\Cache\Backend /** * Phalcon\Cache\Backend\Mongo constructor * - * @param \Phalcon\Cache\FrontendInterface $frontend - * @param array $options + * + * @param \Phalcon\Cache\FrontendInterface $frontend + * @param array $options */ public function __construct(\Phalcon\Cache\FrontendInterface $frontend, $options = null) {} /** * Returns a MongoDb collection based on the backend parameters * - * @return MongoCollection + * + * @return MongoCollection */ protected final function _getCollection() {} /** * Returns a cached content * - * @param string $keyName - * @param int $lifetime - * @return mixed|null + * @param string $keyName + * @param int $lifetime + * @return mixed|null */ public function get($keyName, $lifetime = null) {} /** * Stores cached content into the file backend and stops the frontend * - * @param int|string $keyName - * @param string $content - * @param long $lifetime - * @param boolean $stopBuffer - * @return bool + * + * @param int|string $keyName + * @param string $content + * @param long $lifetime + * @param boolean $stopBuffer + * @return bool */ public function save($keyName = null, $content = null, $lifetime = null, $stopBuffer = true) {} /** * Deletes a value from the cache by its key * - * @param int|string $keyName - * @return boolean + * + * @param int|string $keyName + * @return bool */ public function delete($keyName) {} /** * Query the existing cached keys * - * @param string $prefix - * @return array + * + * @param string $prefix + * @return array */ public function queryKeys($prefix = null) {} /** * Checks if cache exists and it isn't expired * - * @param string $keyName - * @param long $lifetime - * @return boolean + * + * @param string $keyName + * @param long $lifetime + * @return bool */ public function exists($keyName = null, $lifetime = null) {} /** * gc * - * @return collection->remove(...) + * @return collection->remove(...) */ public function gc() {} /** * Increment of a given key by $value * - * @param int|string $keyName - * @param long $value - * @return mixed + * + * @param int|string $keyName + * @param long $value + * @return mixed */ public function increment($keyName, $value = 1) {} /** * Decrement of a given key by $value * - * @param mixed $keyName - * @param mixed $value - * @param int|string $$keyName - * @param long $$value - * @return mixed + * + * @param mixed $keyName + * @param mixed $value + * @param int|string $$keyName + * @param long $$value + * @return mixed */ public function decrement($keyName, $value = 1) {} /** * Immediately invalidates all existing items. * - * @return bool + * @return bool */ public function flush() {} diff --git a/ide/stubs/Phalcon/cache/backend/Redis.php b/ide/stubs/Phalcon/cache/backend/Redis.php index 356109e18..88251a568 100644 --- a/ide/stubs/Phalcon/cache/backend/Redis.php +++ b/ide/stubs/Phalcon/cache/backend/Redis.php @@ -4,30 +4,37 @@ /** * Phalcon\Cache\Backend\Redis + * * Allows to cache output fragments, PHP data or raw data to a redis backend + * * This adapter uses the special redis key "_PHCR" to store all the keys internally used by the adapter + * * * use Phalcon\Cache\Backend\Redis; * use Phalcon\Cache\Frontend\Data as FrontData; + * * // Cache data for 2 days * $frontCache = new FrontData( - * [ - * "lifetime" => 172800, - * ] + * [ + * "lifetime" => 172800, + * ] * ); + * * // Create the Cache setting redis connection options * $cache = new Redis( - * $frontCache, - * [ - * "host" => "localhost", - * "port" => 6379, - * "auth" => "foobared", - * "persistent" => false, - * "index" => 0, - * ] + * $frontCache, + * [ + * "host" => "localhost", + * "port" => 6379, + * "auth" => "foobared", + * "persistent" => false, + * "index" => 0, + * ] * ); + * * // Cache arbitrary data * $cache->save("my-data", [1, 2, 3, 4, 5]); + * * // Get data * $data = $cache->get("my-data"); * @@ -41,10 +48,11 @@ class Redis extends \Phalcon\Cache\Backend /** * Phalcon\Cache\Backend\Redis constructor * + * * @param Phalcon\Cache\FrontendInterface frontend * @param array options - * @param mixed $frontend - * @param mixed $options + * @param \Phalcon\Cache\FrontendInterface $frontend + * @param mixed $options */ public function __construct(\Phalcon\Cache\FrontendInterface $frontend, $options = null) {} @@ -56,70 +64,76 @@ public function _connect() {} /** * Returns a cached content * - * @param string $keyName - * @param int $lifetime - * @return mixed|null + * @param string $keyName + * @param int $lifetime + * @return mixed|null */ public function get($keyName, $lifetime = null) {} /** * Stores cached content into the file backend and stops the frontend * - * @param int|string $keyName - * @param string $content - * @param long $lifetime - * @param boolean $stopBuffer - * @return bool + * + * @param int|string $keyName + * @param string $content + * @param int $lifetime + * @param boolean $stopBuffer + * @return bool */ public function save($keyName = null, $content = null, $lifetime = null, $stopBuffer = true) {} /** * Deletes a value from the cache by its key * - * @param int|string $keyName - * @return bool + * + * @param int|string $keyName + * @return bool */ public function delete($keyName) {} /** * Query the existing cached keys * - * @param string $prefix - * @return array + * + * @param string $prefix + * @return array */ public function queryKeys($prefix = null) {} /** * Checks if cache exists and it isn't expired * - * @param string $keyName - * @param long $lifetime - * @return boolean + * + * @param string $keyName + * @param int $lifetime + * @return bool */ public function exists($keyName = null, $lifetime = null) {} /** * Increment of given $keyName by $value * - * @param string $keyName - * @param long $value - * @return int + * + * @param string $keyName + * @param int $value + * @return int */ public function increment($keyName = null, $value = null) {} /** * Decrement of $keyName by given $value * - * @param string $keyName - * @param long $value - * @return int + * + * @param string $keyName + * @param int $value + * @return int */ public function decrement($keyName = null, $value = null) {} /** * Immediately invalidates all existing items. * - * @return bool + * @return bool */ public function flush() {} diff --git a/ide/stubs/Phalcon/cache/backend/Xcache.php b/ide/stubs/Phalcon/cache/backend/Xcache.php index 08678e7fc..ff5deab25 100644 --- a/ide/stubs/Phalcon/cache/backend/Xcache.php +++ b/ide/stubs/Phalcon/cache/backend/Xcache.php @@ -4,24 +4,30 @@ /** * Phalcon\Cache\Backend\Xcache + * * Allows to cache output fragments, PHP data and raw data using an XCache backend + * * * use Phalcon\Cache\Backend\Xcache; * use Phalcon\Cache\Frontend\Data as FrontData; + * * // Cache data for 2 days * $frontCache = new FrontData( - * [ - * "lifetime" => 172800, - * ] + * [ + * "lifetime" => 172800, + * ] * ); + * * $cache = new Xcache( - * $frontCache, - * [ - * "prefix" => "app-data", - * ] + * $frontCache, + * [ + * "prefix" => "app-data", + * ] * ); + * * // Cache arbitrary data * $cache->save("my-data", [1, 2, 3, 4, 5]); + * * // Get data * $data = $cache->get("my-data"); * @@ -32,78 +38,85 @@ class Xcache extends \Phalcon\Cache\Backend /** * Phalcon\Cache\Backend\Xcache constructor * - * @param \Phalcon\Cache\FrontendInterface $frontend - * @param array $options + * + * @param \Phalcon\Cache\FrontendInterface $frontend + * @param array $options */ public function __construct(\Phalcon\Cache\FrontendInterface $frontend, $options = null) {} /** * Returns a cached content * - * @param string $keyName - * @param int $lifetime - * @return mixed|null + * @param string $keyName + * @param int $lifetime + * @return mixed|null */ public function get($keyName, $lifetime = null) {} /** * Stores cached content into the file backend and stops the frontend * - * @param int|string $keyName - * @param string $content - * @param long $lifetime - * @param boolean $stopBuffer - * @return bool + * + * @param int|string $keyName + * @param string $content + * @param long $lifetime + * @param boolean $stopBuffer + * @return bool */ public function save($keyName = null, $content = null, $lifetime = null, $stopBuffer = true) {} /** * Deletes a value from the cache by its key * - * @param int|string $keyName - * @return boolean + * + * @param int|string $keyName + * @return boolean */ public function delete($keyName) {} /** * Query the existing cached keys * - * @param string $prefix - * @return array + * + * @param string $prefix + * @return array */ public function queryKeys($prefix = null) {} /** * Checks if cache exists and it isn't expired * - * @param string $keyName - * @param long $lifetime - * @return boolean + * + * @param string $keyName + * @param long $lifetime + * @return bool */ public function exists($keyName = null, $lifetime = null) {} /** * Atomic increment of a given key, by number $value * - * @param string $keyName - * @param long $value - * @return mixed + * + * @param string $keyName + * @param long $value + * @return mixed */ public function increment($keyName, $value = 1) {} /** * Atomic decrement of a given key, by number $value * - * @param string $keyName - * @param long $value - * @return mixed + * + * @param string $keyName + * @param long $value + * @return mixed */ public function decrement($keyName, $value = 1) {} /** * Immediately invalidates all existing items. * - * @return bool + * @return bool */ public function flush() {} diff --git a/ide/stubs/Phalcon/cache/frontend/Base64.php b/ide/stubs/Phalcon/cache/frontend/Base64.php index 241d17d3b..971b44d03 100644 --- a/ide/stubs/Phalcon/cache/frontend/Base64.php +++ b/ide/stubs/Phalcon/cache/frontend/Base64.php @@ -4,36 +4,46 @@ /** * Phalcon\Cache\Frontend\Base64 + * * Allows to cache data converting/deconverting them to base64. + * * This adapter uses the base64_encode/base64_decode PHP's functions + * * * 172800, - * ] + * [ + * "lifetime" => 172800, + * ] * ); + * * //Create a MongoDB cache * $cache = new \Phalcon\Cache\Backend\Mongo( - * $frontCache, - * [ - * "server" => "mongodb://localhost", - * "db" => "caches", - * "collection" => "images", - * ] + * $frontCache, + * [ + * "server" => "mongodb://localhost", + * "db" => "caches", + * "collection" => "images", + * ] * ); + * * $cacheKey = "some-image.jpg.cache"; + * * // Try to get cached image * $image = $cache->get($cacheKey); + * * if ($image === null) { - * // Store the image in the cache - * $cache->save( - * $cacheKey, - * file_get_contents("tmp-dir/some-image.jpg") - * ); + * // Store the image in the cache + * $cache->save( + * $cacheKey, + * file_get_contents("tmp-dir/some-image.jpg") + * ); * } + * * header("Content-Type: image/jpeg"); + * * echo $image; * */ @@ -46,21 +56,22 @@ class Base64 implements \Phalcon\Cache\FrontendInterface /** * Phalcon\Cache\Frontend\Base64 constructor * - * @param array $frontendOptions + * + * @param array $frontendOptions */ public function __construct($frontendOptions = null) {} /** * Returns the cache lifetime * - * @return int + * @return int */ public function getLifetime() {} /** * Check whether if frontend is buffering output * - * @return bool + * @return bool */ public function isBuffering() {} @@ -72,7 +83,8 @@ public function start() {} /** * Returns output cached content * - * @return string + * + * @return string */ public function getContent() {} @@ -84,16 +96,16 @@ public function stop() {} /** * Serializes data before storing them * - * @param mixed $data - * @return string + * @param mixed $data + * @return string */ public function beforeStore($data) {} /** * Unserializes data after retrieval * - * @param mixed $data - * @return mixed + * @param mixed $data + * @return mixed */ public function afterRetrieve($data) {} diff --git a/ide/stubs/Phalcon/cache/frontend/Data.php b/ide/stubs/Phalcon/cache/frontend/Data.php index b3c8654cf..0b3226df9 100644 --- a/ide/stubs/Phalcon/cache/frontend/Data.php +++ b/ide/stubs/Phalcon/cache/frontend/Data.php @@ -4,42 +4,51 @@ /** * Phalcon\Cache\Frontend\Data + * * Allows to cache native PHP data in a serialized form + * * * use Phalcon\Cache\Backend\File; * use Phalcon\Cache\Frontend\Data; + * * // Cache the files for 2 days using a Data frontend * $frontCache = new Data( - * [ - * "lifetime" => 172800, - * ] + * [ + * "lifetime" => 172800, + * ] * ); + * * // Create the component that will cache "Data" to a 'File' backend * // Set the cache file directory - important to keep the '/' at the end of * // of the value for the folder * $cache = new File( - * $frontCache, - * [ - * "cacheDir" => "../app/cache/", - * ] + * $frontCache, + * [ + * "cacheDir" => "../app/cache/", + * ] * ); + * * $cacheKey = "robots_order_id.cache"; + * * // Try to get cached records * $robots = $cache->get($cacheKey); + * * if ($robots === null) { - * // $robots is null due to cache expiration or data does not exist - * // Make the database call and populate the variable - * $robots = Robots::find( - * [ - * "order" => "id", - * ] - * ); - * // Store it in the cache - * $cache->save($cacheKey, $robots); + * // $robots is null due to cache expiration or data does not exist + * // Make the database call and populate the variable + * $robots = Robots::find( + * [ + * "order" => "id", + * ] + * ); + * + * // Store it in the cache + * $cache->save($cacheKey, $robots); * } + * * // Use $robots :) * foreach ($robots as $robot) { - * echo $robot->name, "\n"; + * echo $robot->name, "\n"; * } * */ @@ -52,21 +61,22 @@ class Data implements \Phalcon\Cache\FrontendInterface /** * Phalcon\Cache\Frontend\Data constructor * - * @param array $frontendOptions + * + * @param array $frontendOptions */ public function __construct($frontendOptions = null) {} /** * Returns the cache lifetime * - * @return int + * @return int */ public function getLifetime() {} /** * Check whether if frontend is buffering output * - * @return bool + * @return bool */ public function isBuffering() {} @@ -78,7 +88,8 @@ public function start() {} /** * Returns output cached content * - * @return string + * + * @return string */ public function getContent() {} @@ -90,15 +101,15 @@ public function stop() {} /** * Serializes data before storing them * - * @param mixed $data + * @param mixed $data */ public function beforeStore($data) {} /** * Unserializes data after retrieval * - * @param mixed $data - * @return mixed + * @param mixed $data + * @return mixed */ public function afterRetrieve($data) {} diff --git a/ide/stubs/Phalcon/cache/frontend/Igbinary.php b/ide/stubs/Phalcon/cache/frontend/Igbinary.php index 239a0fbc2..fa3af7d88 100644 --- a/ide/stubs/Phalcon/cache/frontend/Igbinary.php +++ b/ide/stubs/Phalcon/cache/frontend/Igbinary.php @@ -4,40 +4,48 @@ /** * Phalcon\Cache\Frontend\Igbinary + * * Allows to cache native PHP data in a serialized form using igbinary extension + * * * // Cache the files for 2 days using Igbinary frontend * $frontCache = new \Phalcon\Cache\Frontend\Igbinary( - * [ - * "lifetime" => 172800, - * ] + * [ + * "lifetime" => 172800, + * ] * ); + * * // Create the component that will cache "Igbinary" to a "File" backend * // Set the cache file directory - important to keep the "/" at the end of * // of the value for the folder * $cache = new \Phalcon\Cache\Backend\File( - * $frontCache, - * [ - * "cacheDir" => "../app/cache/", - * ] + * $frontCache, + * [ + * "cacheDir" => "../app/cache/", + * ] * ); + * * $cacheKey = "robots_order_id.cache"; + * * // Try to get cached records * $robots = $cache->get($cacheKey); + * * if ($robots === null) { - * // $robots is null due to cache expiration or data do not exist - * // Make the database call and populate the variable - * $robots = Robots::find( - * [ - * "order" => "id", - * ] - * ); - * // Store it in the cache - * $cache->save($cacheKey, $robots); + * // $robots is null due to cache expiration or data do not exist + * // Make the database call and populate the variable + * $robots = Robots::find( + * [ + * "order" => "id", + * ] + * ); + * + * // Store it in the cache + * $cache->save($cacheKey, $robots); * } + * * // Use $robots :) * foreach ($robots as $robot) { - * echo $robot->name, "\n"; + * echo $robot->name, "\n"; * } * */ @@ -47,21 +55,22 @@ class Igbinary extends \Phalcon\Cache\Frontend\Data implements \Phalcon\Cache\Fr /** * Phalcon\Cache\Frontend\Data constructor * - * @param array $frontendOptions + * + * @param array $frontendOptions */ public function __construct($frontendOptions = null) {} /** * Returns the cache lifetime * - * @return int + * @return int */ public function getLifetime() {} /** * Check whether if frontend is buffering output * - * @return bool + * @return bool */ public function isBuffering() {} @@ -73,7 +82,8 @@ public function start() {} /** * Returns output cached content * - * @return string + * + * @return string */ public function getContent() {} @@ -85,16 +95,16 @@ public function stop() {} /** * Serializes data before storing them * - * @param mixed $data - * @return string + * @param mixed $data + * @return string */ public function beforeStore($data) {} /** * Unserializes data after retrieval * - * @param mixed $data - * @return mixed + * @param mixed $data + * @return mixed */ public function afterRetrieve($data) {} diff --git a/ide/stubs/Phalcon/cache/frontend/Json.php b/ide/stubs/Phalcon/cache/frontend/Json.php index 8ea9c28a9..aad6b159a 100644 --- a/ide/stubs/Phalcon/cache/frontend/Json.php +++ b/ide/stubs/Phalcon/cache/frontend/Json.php @@ -4,29 +4,37 @@ /** * Phalcon\Cache\Frontend\Json + * * Allows to cache data converting/deconverting them to JSON. + * * This adapter uses the json_encode/json_decode PHP's functions + * * As the data is encoded in JSON other systems accessing the same backend could * process them + * * * 172800, - * ] + * [ + * "lifetime" => 172800, + * ] * ); + * * // Create the Cache setting memcached connection options * $cache = new \Phalcon\Cache\Backend\Memcache( - * $frontCache, - * [ - * "host" => "localhost", - * "port" => 11211, - * "persistent" => false, - * ] + * $frontCache, + * [ + * "host" => "localhost", + * "port" => 11211, + * "persistent" => false, + * ] * ); + * * // Cache arbitrary data * $cache->save("my-data", [1, 2, 3, 4, 5]); + * * // Get data * $data = $cache->get("my-data"); * @@ -40,21 +48,22 @@ class Json implements \Phalcon\Cache\FrontendInterface /** * Phalcon\Cache\Frontend\Base64 constructor * - * @param array $frontendOptions + * + * @param array $frontendOptions */ public function __construct($frontendOptions = null) {} /** * Returns the cache lifetime * - * @return int + * @return int */ public function getLifetime() {} /** * Check whether if frontend is buffering output * - * @return bool + * @return bool */ public function isBuffering() {} @@ -66,7 +75,8 @@ public function start() {} /** * Returns output cached content * - * @return string + * + * @return string */ public function getContent() {} @@ -78,16 +88,16 @@ public function stop() {} /** * Serializes data before storing them * - * @param mixed $data - * @return string + * @param mixed $data + * @return string */ public function beforeStore($data) {} /** * Unserializes data after retrieval * - * @param mixed $data - * @return mixed + * @param mixed $data + * @return mixed */ public function afterRetrieve($data) {} diff --git a/ide/stubs/Phalcon/cache/frontend/Msgpack.php b/ide/stubs/Phalcon/cache/frontend/Msgpack.php index fc445fdf3..e6bdada2f 100644 --- a/ide/stubs/Phalcon/cache/frontend/Msgpack.php +++ b/ide/stubs/Phalcon/cache/frontend/Msgpack.php @@ -4,45 +4,55 @@ /** * Phalcon\Cache\Frontend\Msgpack + * * Allows to cache native PHP data in a serialized form using msgpack extension * This adapter uses a Msgpack frontend to store the cached content and requires msgpack extension. * + * * @link https://github.com/msgpack/msgpack-php + * * * use Phalcon\Cache\Backend\File; * use Phalcon\Cache\Frontend\Msgpack; + * * // Cache the files for 2 days using Msgpack frontend * $frontCache = new Msgpack( - * [ - * "lifetime" => 172800, - * ] + * [ + * "lifetime" => 172800, + * ] * ); + * * // Create the component that will cache "Msgpack" to a "File" backend * // Set the cache file directory - important to keep the "/" at the end of * // of the value for the folder * $cache = new File( - * $frontCache, - * [ - * "cacheDir" => "../app/cache/", - * ] + * $frontCache, + * [ + * "cacheDir" => "../app/cache/", + * ] * ); + * * $cacheKey = "robots_order_id.cache"; + * * // Try to get cached records * $robots = $cache->get($cacheKey); + * * if ($robots === null) { - * // $robots is null due to cache expiration or data do not exist - * // Make the database call and populate the variable - * $robots = Robots::find( - * [ - * "order" => "id", - * ] - * ); - * // Store it in the cache - * $cache->save($cacheKey, $robots); + * // $robots is null due to cache expiration or data do not exist + * // Make the database call and populate the variable + * $robots = Robots::find( + * [ + * "order" => "id", + * ] + * ); + * + * // Store it in the cache + * $cache->save($cacheKey, $robots); * } + * * // Use $robots * foreach ($robots as $robot) { - * echo $robot->name, "\n"; + * echo $robot->name, "\n"; * } * */ @@ -52,21 +62,22 @@ class Msgpack extends \Phalcon\Cache\Frontend\Data implements \Phalcon\Cache\Fro /** * Phalcon\Cache\Frontend\Msgpack constructor * - * @param array $frontendOptions + * + * @param array $frontendOptions */ public function __construct($frontendOptions = null) {} /** * Returns the cache lifetime * - * @return int + * @return int */ public function getLifetime() {} /** * Check whether if frontend is buffering output * - * @return bool + * @return bool */ public function isBuffering() {} @@ -78,7 +89,7 @@ public function start() {} /** * Returns output cached content * - * @return null + * @return null */ public function getContent() {} @@ -90,16 +101,16 @@ public function stop() {} /** * Serializes data before storing them * - * @param mixed $data - * @return string + * @param mixed $data + * @return string */ public function beforeStore($data) {} /** * Unserializes data after retrieval * - * @param mixed $data - * @return mixed + * @param mixed $data + * @return mixed */ public function afterRetrieve($data) {} diff --git a/ide/stubs/Phalcon/cache/frontend/None.php b/ide/stubs/Phalcon/cache/frontend/None.php index 582ae0ba1..2e6160d9e 100644 --- a/ide/stubs/Phalcon/cache/frontend/None.php +++ b/ide/stubs/Phalcon/cache/frontend/None.php @@ -4,36 +4,45 @@ /** * Phalcon\Cache\Frontend\None + * * Discards any kind of frontend data input. This frontend does not have expiration time or any other options + * * * "localhost", - * "port" => "11211", - * ] + * $frontCache, + * [ + * "host" => "localhost", + * "port" => "11211", + * ] * ); + * * $cacheKey = "robots_order_id.cache"; + * * // This Frontend always return the data as it's returned by the backend * $robots = $cache->get($cacheKey); + * * if ($robots === null) { - * // This cache doesn't perform any expiration checking, so the data is always expired - * // Make the database call and populate the variable - * $robots = Robots::find( - * [ - * "order" => "id", - * ] - * ); - * $cache->save($cacheKey, $robots); + * // This cache doesn't perform any expiration checking, so the data is always expired + * // Make the database call and populate the variable + * $robots = Robots::find( + * [ + * "order" => "id", + * ] + * ); + * + * $cache->save($cacheKey, $robots); * } + * * // Use $robots :) * foreach ($robots as $robot) { - * echo $robot->name, "\n"; + * echo $robot->name, "\n"; * } * */ @@ -43,14 +52,14 @@ class None implements \Phalcon\Cache\FrontendInterface /** * Returns cache lifetime, always one second expiring content * - * @return int + * @return int */ public function getLifetime() {} /** * Check whether if frontend is buffering output, always false * - * @return bool + * @return bool */ public function isBuffering() {} @@ -62,7 +71,8 @@ public function start() {} /** * Returns output cached content * - * @return string + * + * @return string */ public function getContent() {} @@ -74,15 +84,15 @@ public function stop() {} /** * Prepare data to be stored * - * @param mixed $data + * @param mixed $data */ public function beforeStore($data) {} /** * Prepares data to be retrieved to user * - * @param mixed $data - * @return mixed + * @param mixed $data + * @return mixed */ public function afterRetrieve($data) {} diff --git a/ide/stubs/Phalcon/cache/frontend/Output.php b/ide/stubs/Phalcon/cache/frontend/Output.php index 43c9eaddb..98251804e 100644 --- a/ide/stubs/Phalcon/cache/frontend/Output.php +++ b/ide/stubs/Phalcon/cache/frontend/Output.php @@ -4,45 +4,53 @@ /** * Phalcon\Cache\Frontend\Output - * Allows to cache output fragments captured with ob_* functions + * + * Allows to cache output fragments captured with ob_ functions + * * * use Phalcon\Tag; * use Phalcon\Cache\Backend\File; * use Phalcon\Cache\Frontend\Output; + * * // Create an Output frontend. Cache the files for 2 days * $frontCache = new Output( - * [ - * "lifetime" => 172800, - * ] + * [ + * "lifetime" => 172800, + * ] * ); + * * // Create the component that will cache from the "Output" to a "File" backend * // Set the cache file directory - it's important to keep the "/" at the end of * // the value for the folder * $cache = new File( - * $frontCache, - * [ - * "cacheDir" => "../app/cache/", - * ] + * $frontCache, + * [ + * "cacheDir" => "../app/cache/", + * ] * ); + * * // Get/Set the cache file to ../app/cache/my-cache.html * $content = $cache->start("my-cache.html"); + * * // If $content is null then the content will be generated for the cache * if (null === $content) { - * // Print date and time - * echo date("r"); - * // Generate a link to the sign-up action - * echo Tag::linkTo( - * [ - * "user/signup", - * "Sign Up", - * "class" => "signup-button", - * ] - * ); - * // Store the output into the cache file - * $cache->save(); + * // Print date and time + * echo date("r"); + * + * // Generate a link to the sign-up action + * echo Tag::linkTo( + * [ + * "user/signup", + * "Sign Up", + * "class" => "signup-button", + * ] + * ); + * + * // Store the output into the cache file + * $cache->save(); * } else { - * // Echo the cached output - * echo $content; + * // Echo the cached output + * echo $content; * } * */ @@ -58,21 +66,22 @@ class Output implements \Phalcon\Cache\FrontendInterface /** * Phalcon\Cache\Frontend\Output constructor * - * @param array $frontendOptions + * + * @param array $frontendOptions */ public function __construct($frontendOptions = null) {} /** * Returns the cache lifetime * - * @return int + * @return int */ public function getLifetime() {} /** * Check whether if frontend is buffering output * - * @return bool + * @return bool */ public function isBuffering() {} @@ -84,7 +93,8 @@ public function start() {} /** * Returns output cached content * - * @return string + * + * @return string */ public function getContent() {} @@ -96,16 +106,16 @@ public function stop() {} /** * Serializes data before storing them * - * @param mixed $data - * @return string + * @param mixed $data + * @return string */ public function beforeStore($data) {} /** * Unserializes data after retrieval * - * @param mixed $data - * @return mixed + * @param mixed $data + * @return mixed */ public function afterRetrieve($data) {} diff --git a/ide/stubs/Phalcon/cli/Console.php b/ide/stubs/Phalcon/cli/Console.php index 6d83db019..01123b6d5 100644 --- a/ide/stubs/Phalcon/cli/Console.php +++ b/ide/stubs/Phalcon/cli/Console.php @@ -4,6 +4,7 @@ /** * Phalcon\Cli\Console + * * This component allows to create CLI applications using Phalcon */ class Console extends \Phalcon\Application @@ -17,35 +18,37 @@ class Console extends \Phalcon\Application /** * Merge modules with the existing ones + * * * $application->addModules( - * [ - * "admin" => [ - * "className" => "Multiple\\Admin\\Module", - * "path" => "../apps/admin/Module.php", - * ], - * ] + * [ + * "admin" => [ + * "className" => "Multiple\\Admin\\Module", + * "path" => "../apps/admin/Module.php", + * ], + * ] * ); * * - * @param array $modules + * @param array $modules + * @deprecated */ public function addModules(array $modules) {} /** * Handle the whole command-line tasks * - * @param array $arguments + * @param array $arguments */ public function handle(array $arguments = null) {} /** * Set an specific argument * - * @param array $arguments - * @param bool $str - * @param bool $shift - * @return Console + * @param array $arguments + * @param bool $str + * @param bool $shift + * @return Console */ public function setArgument(array $arguments = null, $str = true, $shift = true) {} diff --git a/ide/stubs/Phalcon/cli/Dispatcher.php b/ide/stubs/Phalcon/cli/Dispatcher.php index fc74ac79e..eedb84bcc 100644 --- a/ide/stubs/Phalcon/cli/Dispatcher.php +++ b/ide/stubs/Phalcon/cli/Dispatcher.php @@ -4,16 +4,22 @@ /** * Phalcon\Cli\Dispatcher + * * Dispatching is the process of taking the command-line arguments, extracting the module name, * task name, action name, and optional parameters contained in it, and then * instantiating a task and calling an action on it. + * * * $di = new \Phalcon\Di(); + * * $dispatcher = new \Phalcon\Cli\Dispatcher(); + * * $dispatcher->setDi($di); + * * $dispatcher->setTaskName("posts"); * $dispatcher->setActionName("index"); * $dispatcher->setParams([]); + * * $handle = $dispatcher->dispatch(); * */ @@ -35,78 +41,78 @@ class Dispatcher extends \Phalcon\Dispatcher implements \Phalcon\Cli\DispatcherI /** * Sets the default task suffix * - * @param string $taskSuffix + * @param string $taskSuffix */ public function setTaskSuffix($taskSuffix) {} /** * Sets the default task name * - * @param string $taskName + * @param string $taskName */ public function setDefaultTask($taskName) {} /** * Sets the task name to be dispatched * - * @param string $taskName + * @param string $taskName */ public function setTaskName($taskName) {} /** * Gets last dispatched task name * - * @return string + * @return string */ public function getTaskName() {} /** * Throws an internal exception * - * @param string $message - * @param int $exceptionCode + * @param string $message + * @param int $exceptionCode */ protected function _throwDispatchException($message, $exceptionCode = 0) {} /** * Handles a user exception * - * @param mixed $exception + * @param \Exception $exception */ protected function _handleException(\Exception $exception) {} /** * Returns the latest dispatched controller * - * @return TaskInterface + * @return TaskInterface */ public function getLastTask() {} /** * Returns the active task in the dispatcher * - * @return TaskInterface + * @return TaskInterface */ public function getActiveTask() {} /** * Set the options to be dispatched * - * @param array $options + * @param array $options */ public function setOptions(array $options) {} /** * Get dispatched options * - * @return array + * @return array */ public function getOptions() {} /** - * @param mixed $handler - * @param string $actionMethod - * @param array $params + * @param mixed $handler + * @param string $actionMethod + * @param array $params */ public function callActionMethod($handler, $actionMethod, array $params = array()) {} diff --git a/ide/stubs/Phalcon/cli/DispatcherInterface.php b/ide/stubs/Phalcon/cli/DispatcherInterface.php index 19f605324..99a31ecca 100644 --- a/ide/stubs/Phalcon/cli/DispatcherInterface.php +++ b/ide/stubs/Phalcon/cli/DispatcherInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Cli\DispatcherInterface + * * Interface for Phalcon\Cli\Dispatcher */ interface DispatcherInterface extends \Phalcon\DispatcherInterface @@ -12,42 +13,42 @@ interface DispatcherInterface extends \Phalcon\DispatcherInterface /** * Sets the default task suffix * - * @param string $taskSuffix + * @param string $taskSuffix */ public function setTaskSuffix($taskSuffix); /** * Sets the default task name * - * @param string $taskName + * @param string $taskName */ public function setDefaultTask($taskName); /** * Sets the task name to be dispatched * - * @param string $taskName + * @param string $taskName */ public function setTaskName($taskName); /** * Gets last dispatched task name * - * @return string + * @return string */ public function getTaskName(); /** * Returns the latest dispatched controller * - * @return TaskInterface + * @return TaskInterface */ public function getLastTask(); /** * Returns the active task in the dispatcher * - * @return TaskInterface + * @return TaskInterface */ public function getActiveTask(); diff --git a/ide/stubs/Phalcon/cli/Router.php b/ide/stubs/Phalcon/cli/Router.php index 3b83e73e0..a7da3aa2c 100644 --- a/ide/stubs/Phalcon/cli/Router.php +++ b/ide/stubs/Phalcon/cli/Router.php @@ -4,19 +4,23 @@ /** * Phalcon\Cli\Router + * *

Phalcon\Cli\Router is the standard framework router. Routing is the * process of taking a command-line arguments and * decomposing it into parameters to determine which module, task, and * action of that task should receive the request

+ * * * $router = new \Phalcon\Cli\Router(); + * * $router->handle( - * [ - * "module" => "main", - * "task" => "videos", - * "action" => "process", - * ] + * [ + * "module" => "main", + * "task" => "videos", + * "action" => "process", + * ] * ); + * * echo $router->getTaskName(); * */ @@ -65,150 +69,157 @@ class Router implements \Phalcon\Di\InjectionAwareInterface /** * Phalcon\Cli\Router constructor * - * @param bool $defaultRoutes + * @param bool $defaultRoutes */ public function __construct($defaultRoutes = true) {} /** * Sets the dependency injector * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the internal dependency injector * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI() {} /** * Sets the name of the default module * - * @param string $moduleName + * @param string $moduleName */ public function setDefaultModule($moduleName) {} /** * Sets the default controller name * - * @param string $taskName + * @param string $taskName */ public function setDefaultTask($taskName) {} /** * Sets the default action name * - * @param string $actionName + * @param string $actionName */ public function setDefaultAction($actionName) {} /** * Sets an array of default paths. If a route is missing a path the router will use the defined here * This method must not be used to set a 404 route + * * * $router->setDefaults( - * [ - * "module" => "common", - * "action" => "index", - * ] + * [ + * "module" => "common", + * "action" => "index", + * ] * ); * * - * @param array $defaults - * @return Router + * @param array $defaults + * @return Router */ public function setDefaults(array $defaults) {} /** * Handles routing information received from command-line arguments * - * @param array $arguments + * + * @param array $arguments */ public function handle($arguments = null) {} /** * Adds a route to the router + * * * $router->add("/about", "About::main"); * * - * @param string $pattern - * @param string/array $paths - * @return \Phalcon\Cli\Router\Route + * + * @param string $pattern + * @param string/array $paths + * @return RouteInterface */ public function add($pattern, $paths = null) {} /** * Returns processed module name * - * @return string + * @return string */ public function getModuleName() {} /** * Returns processed task name * - * @return string + * @return string */ public function getTaskName() {} /** * Returns processed action name * - * @return string + * @return string */ public function getActionName() {} /** * Returns processed extra params * - * @return array + * + * @return array */ public function getParams() {} /** * Returns the route that matches the handled URI * - * @return RouteInterface + * @return RouteInterface */ public function getMatchedRoute() {} /** * Returns the sub expressions in the regular expression matched * - * @return array + * + * @return array */ public function getMatches() {} /** * Checks if the router matches any of the defined routes * - * @return bool + * @return bool */ public function wasMatched() {} /** * Returns all the routes defined in the router * - * @return Route[] + * @return \Phalcon\Cli\Router\Route[] */ public function getRoutes() {} /** * Returns a route object by its id * - * @param int $id - * @return \Phalcon\Cli\Router\Route + * + * @param int $id + * @return bool|RouteInterface */ public function getRouteById($id) {} /** * Returns a route object by its name * - * @param string $name - * @return bool|RouteInterface + * @param string $name + * @return bool|RouteInterface */ public function getRouteByName($name) {} diff --git a/ide/stubs/Phalcon/cli/RouterInterface.php b/ide/stubs/Phalcon/cli/RouterInterface.php index 88d51580f..a34a9fc3f 100644 --- a/ide/stubs/Phalcon/cli/RouterInterface.php +++ b/ide/stubs/Phalcon/cli/RouterInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Cli\RouterInterface + * * Interface for Phalcon\Cli\Router */ interface RouterInterface @@ -12,116 +13,117 @@ interface RouterInterface /** * Sets the name of the default module * - * @param string $moduleName + * @param string $moduleName */ public function setDefaultModule($moduleName); /** * Sets the default task name * - * @param string $taskName + * @param string $taskName */ public function setDefaultTask($taskName); /** * Sets the default action name * - * @param string $actionName + * @param string $actionName */ public function setDefaultAction($actionName); /** * Sets an array of default paths * - * @param array $defaults + * @param array $defaults */ public function setDefaults(array $defaults); /** * Handles routing information received from the rewrite engine * - * @param array $arguments + * + * @param array $arguments */ public function handle($arguments = null); /** * Adds a route to the router on any HTTP method * - * @param string $pattern - * @param mixed $paths - * @return \Phalcon\Cli\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @return \Phalcon\Cli\Router\RouteInterface */ public function add($pattern, $paths = null); /** * Returns processed module name * - * @return string + * @return string */ public function getModuleName(); /** * Returns processed task name * - * @return string + * @return string */ public function getTaskName(); /** * Returns processed action name * - * @return string + * @return string */ public function getActionName(); /** * Returns processed extra params * - * @return array + * @return array */ public function getParams(); /** * Returns the route that matches the handled URI * - * @return \Phalcon\Cli\Router\RouteInterface + * @return \Phalcon\Cli\Router\RouteInterface */ public function getMatchedRoute(); /** * Return the sub expressions in the regular expression matched * - * @return array + * @return array */ public function getMatches(); /** * Check if the router matches any of the defined routes * - * @return bool + * @return bool */ public function wasMatched(); /** * Return all the routes defined in the router * - * @return RouteInterface[] + * @return \Phalcon\Cli\Router\RouteInterface[] */ public function getRoutes(); /** * Returns a route object by its id * - * @param mixed $id - * @return \Phalcon\Cli\Router\RouteInterface + * @param mixed $id + * @return \Phalcon\Cli\Router\RouteInterface */ public function getRouteById($id); /** * Returns a route object by its name * - * @param string $name - * @return \Phalcon\Cli\Router\RouteInterface + * @param string $name + * @return \Phalcon\Cli\Router\RouteInterface */ public function getRouteByName($name); diff --git a/ide/stubs/Phalcon/cli/Task.php b/ide/stubs/Phalcon/cli/Task.php index 87bc5ed8a..038a66039 100644 --- a/ide/stubs/Phalcon/cli/Task.php +++ b/ide/stubs/Phalcon/cli/Task.php @@ -4,19 +4,25 @@ /** * Phalcon\Cli\Task + * * Every command-line task should extend this class that encapsulates all the task functionality + * * A task can be used to run "tasks" such as migrations, cronjobs, unit-tests, or anything that you want. * The Task class should at least have a "mainAction" method + * * * class HelloTask extends \Phalcon\Cli\Task * { - * // This action will be executed by default - * public function mainAction() - * { - * } - * public function findAction() - * { - * } + * // This action will be executed by default + * public function mainAction() + * { + * + * } + * + * public function findAction() + * { + * + * } * } * */ diff --git a/ide/stubs/Phalcon/cli/TaskInterface.php b/ide/stubs/Phalcon/cli/TaskInterface.php index 8a6c2a0f6..2b561c823 100644 --- a/ide/stubs/Phalcon/cli/TaskInterface.php +++ b/ide/stubs/Phalcon/cli/TaskInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Cli\TaskInterface + * * Interface for task handlers */ interface TaskInterface diff --git a/ide/stubs/Phalcon/cli/console/Exception.php b/ide/stubs/Phalcon/cli/console/Exception.php index 561ec8bf2..e109385a4 100644 --- a/ide/stubs/Phalcon/cli/console/Exception.php +++ b/ide/stubs/Phalcon/cli/console/Exception.php @@ -4,7 +4,9 @@ /** * Phalcon\Cli\Console\Exception + * * Exceptions thrown in Phalcon\Cli\Console will use this class + * */ class Exception extends \Phalcon\Application\Exception { diff --git a/ide/stubs/Phalcon/cli/dispatcher/Exception.php b/ide/stubs/Phalcon/cli/dispatcher/Exception.php index 06846a01e..416f26a64 100644 --- a/ide/stubs/Phalcon/cli/dispatcher/Exception.php +++ b/ide/stubs/Phalcon/cli/dispatcher/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Cli\Dispatcher\Exception + * * Exceptions thrown in Phalcon\Cli\Dispatcher will use this class */ class Exception extends \Phalcon\Exception diff --git a/ide/stubs/Phalcon/cli/router/Exception.php b/ide/stubs/Phalcon/cli/router/Exception.php index 6dd63f9ae..b0bfc62c7 100644 --- a/ide/stubs/Phalcon/cli/router/Exception.php +++ b/ide/stubs/Phalcon/cli/router/Exception.php @@ -4,7 +4,9 @@ /** * Phalcon\Cli\Router\Exception + * * Exceptions thrown in Phalcon\Cli\Router will use this class + * */ class Exception extends \Phalcon\Exception { diff --git a/ide/stubs/Phalcon/cli/router/Route.php b/ide/stubs/Phalcon/cli/router/Route.php index e7c006199..bddc8203a 100644 --- a/ide/stubs/Phalcon/cli/router/Route.php +++ b/ide/stubs/Phalcon/cli/router/Route.php @@ -4,7 +4,9 @@ /** * Phalcon\Cli\Router\Route + * * This class represents every route added to the router + * */ class Route { @@ -45,55 +47,59 @@ class Route /** * Phalcon\Cli\Router\Route constructor * - * @param string $pattern - * @param array $paths + * + * @param string $pattern + * @param array $paths */ public function __construct($pattern, $paths = null) {} /** * Replaces placeholders from pattern returning a valid PCRE regular expression * - * @param string $pattern - * @return string + * @param string $pattern + * @return string */ public function compilePattern($pattern) {} /** * Extracts parameters from a string * - * @param string $pattern - * @return array|boolean + * + * @param string $pattern + * @return array|boolean */ public function extractNamedParams($pattern) {} /** * Reconfigure the route adding a new pattern and a set of paths * - * @param string $pattern - * @param array $paths + * + * @param string $pattern + * @param array $paths */ public function reConfigure($pattern, $paths = null) {} /** * Returns the route's name * - * @return string + * @return string */ public function getName() {} /** * Sets the route's name + * * * $router->add( - * "/about", - * [ - * "controller" => "about", - * ] + * "/about", + * [ + * "controller" => "about", + * ] * )->setName("about"); * * - * @param string $name - * @return Route + * @param string $name + * @return Route */ public function setName($name) {} @@ -102,66 +108,69 @@ public function setName($name) {} * The developer can implement any arbitrary conditions here * If the callback returns false the route is treated as not matched * - * @param callback $callback - * @return \Phalcon\Cli\Router\Route + * + * @param callback $callback + * @return Route */ public function beforeMatch($callback) {} /** * Returns the 'before match' callback if any * - * @return mixed + * + * @return mixed */ public function getBeforeMatch() {} /** * Returns the route's id * - * @return string + * @return string */ public function getRouteId() {} /** * Returns the route's pattern * - * @return string + * @return string */ public function getPattern() {} /** * Returns the route's compiled pattern * - * @return string + * @return string */ public function getCompiledPattern() {} /** * Returns the paths * - * @return array + * @return array */ public function getPaths() {} /** * Returns the paths using positions as keys and names as values * - * @return array + * @return array */ public function getReversedPaths() {} /** * Adds a converter to perform an additional transformation for certain parameter * - * @param string $name - * @param callable $converter - * @return \Phalcon\Cli\Router\Route + * + * @param string $name + * @param callable $converter + * @return Route */ public function convert($name, $converter) {} /** * Returns the router converter * - * @return array + * @return array */ public function getConverters() {} @@ -173,14 +182,14 @@ public static function reset() {} /** * Set the routing delimiter * - * @param string $delimiter + * @param string $delimiter */ public static function delimiter($delimiter = null) {} /** * Get routing delimiter * - * @return string + * @return string */ public static function getDelimiter() {} diff --git a/ide/stubs/Phalcon/cli/router/RouteInterface.php b/ide/stubs/Phalcon/cli/router/RouteInterface.php index 639429181..cec93a312 100644 --- a/ide/stubs/Phalcon/cli/router/RouteInterface.php +++ b/ide/stubs/Phalcon/cli/router/RouteInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Cli\Router\RouteInterface + * * Interface for Phalcon\Cli\Router\Route */ interface RouteInterface @@ -12,65 +13,65 @@ interface RouteInterface /** * Replaces placeholders from pattern returning a valid PCRE regular expression * - * @param string $pattern - * @return string + * @param string $pattern + * @return string */ public function compilePattern($pattern); /** * Reconfigure the route adding a new pattern and a set of paths * - * @param string $pattern - * @param mixed $paths + * @param string $pattern + * @param mixed $paths */ public function reConfigure($pattern, $paths = null); /** * Returns the route's name * - * @return string + * @return string */ public function getName(); /** * Sets the route's name * - * @param string $name + * @param string $name */ public function setName($name); /** * Returns the route's id * - * @return string + * @return string */ public function getRouteId(); /** * Returns the route's pattern * - * @return string + * @return string */ public function getPattern(); /** * Returns the route's pattern * - * @return string + * @return string */ public function getCompiledPattern(); /** * Returns the paths * - * @return array + * @return array */ public function getPaths(); /** * Returns the paths using positions as keys and names as values * - * @return array + * @return array */ public function getReversedPaths(); diff --git a/ide/stubs/Phalcon/config/Exception.php b/ide/stubs/Phalcon/config/Exception.php index a6f27ac66..6a2ac990e 100644 --- a/ide/stubs/Phalcon/config/Exception.php +++ b/ide/stubs/Phalcon/config/Exception.php @@ -4,7 +4,9 @@ /** * Phalcon\Config\Exception + * * Exceptions thrown in Phalcon\Config will use this class + * */ class Exception extends \Phalcon\Exception { diff --git a/ide/stubs/Phalcon/config/adapter/Ini.php b/ide/stubs/Phalcon/config/adapter/Ini.php index a13002e35..92be3f216 100644 --- a/ide/stubs/Phalcon/config/adapter/Ini.php +++ b/ide/stubs/Phalcon/config/adapter/Ini.php @@ -4,8 +4,11 @@ /** * Phalcon\Config\Adapter\Ini + * * Reads ini files and converts them to Phalcon\Config objects. + * * Given the next configuration file: + * * * [database] * adapter = Mysql @@ -13,25 +16,31 @@ * username = scott * password = cheetah * dbname = test_db + * * [phalcon] * controllersDir = "../app/controllers/" * modelsDir = "../app/models/" * viewsDir = "../app/views/" * + * * You can read it as follows: + * * * $config = new \Phalcon\Config\Adapter\Ini("path/config.ini"); + * * echo $config->phalcon->controllersDir; * echo $config->database->username; * + * * PHP constants may also be parsed in the ini file, so if you define a constant * as an ini value before calling the constructor, the constant's value will be * integrated into the results. To use it this way you must specify the optional * second parameter as INI_SCANNER_NORMAL when calling the constructor: + * * * $config = new \Phalcon\Config\Adapter\Ini( - * "path/config-with-constants.ini", - * INI_SCANNER_NORMAL + * "path/config-with-constants.ini", + * INI_SCANNER_NORMAL * ); * */ @@ -41,36 +50,39 @@ class Ini extends \Phalcon\Config /** * Phalcon\Config\Adapter\Ini constructor * - * @param string $filePath - * @param mixed $mode + * @param string $filePath + * @param mixed $mode */ public function __construct($filePath, $mode = null) {} /** * Build multidimensional array from string + * * * $this->_parseIniString("path.hello.world", "value for last key"); + * * // result * [ - * "path" => [ - * "hello" => [ - * "world" => "value for last key", - * ], - * ], + * "path" => [ + * "hello" => [ + * "world" => "value for last key", + * ], + * ], * ]; * * - * @param string $path - * @param mixed $value - * @return array + * @param string $path + * @param mixed $value + * @return array */ protected function _parseIniString($path, $value) {} /** * We have to cast values manually because parse_ini_file() has a poor implementation. * + * * @param mixed $ini The array casted by `parse_ini_file` - * @return bool|null|double|int|string + * @return bool|null|double|int|string */ protected function _cast($ini) {} diff --git a/ide/stubs/Phalcon/config/adapter/Json.php b/ide/stubs/Phalcon/config/adapter/Json.php index 5ee81e9f3..5c9f5761d 100644 --- a/ide/stubs/Phalcon/config/adapter/Json.php +++ b/ide/stubs/Phalcon/config/adapter/Json.php @@ -4,14 +4,20 @@ /** * Phalcon\Config\Adapter\Json + * * Reads JSON files and converts them to Phalcon\Config objects. + * * Given the following configuration file: + * * * {"phalcon":{"baseuri":"\/phalcon\/"},"models":{"metadata":"memory"}} * + * * You can read it as follows: + * * * $config = new Phalcon\Config\Adapter\Json("path/config.json"); + * * echo $config->phalcon->baseuri; * echo $config->models->metadata; * @@ -22,7 +28,7 @@ class Json extends \Phalcon\Config /** * Phalcon\Config\Adapter\Json constructor * - * @param string $filePath + * @param string $filePath */ public function __construct($filePath) {} diff --git a/ide/stubs/Phalcon/config/adapter/Php.php b/ide/stubs/Phalcon/config/adapter/Php.php index 840f1ec58..844d44e62 100644 --- a/ide/stubs/Phalcon/config/adapter/Php.php +++ b/ide/stubs/Phalcon/config/adapter/Php.php @@ -4,28 +4,35 @@ /** * Phalcon\Config\Adapter\Php + * * Reads php files and converts them to Phalcon\Config objects. + * * Given the next configuration file: + * * * [ - * "adapter" => "Mysql", - * "host" => "localhost", - * "username" => "scott", - * "password" => "cheetah", - * "dbname" => "test_db", - * ], - * "phalcon" => [ - * "controllersDir" => "../app/controllers/", - * "modelsDir" => "../app/models/", - * "viewsDir" => "../app/views/", - * ], + * "database" => [ + * "adapter" => "Mysql", + * "host" => "localhost", + * "username" => "scott", + * "password" => "cheetah", + * "dbname" => "test_db", + * ], + * "phalcon" => [ + * "controllersDir" => "../app/controllers/", + * "modelsDir" => "../app/models/", + * "viewsDir" => "../app/views/", + * ], * ]; * + * * You can read it as follows: + * * * $config = new \Phalcon\Config\Adapter\Php("path/config.php"); + * * echo $config->phalcon->controllersDir; * echo $config->database->username; * @@ -36,7 +43,7 @@ class Php extends \Phalcon\Config /** * Phalcon\Config\Adapter\Php constructor * - * @param string $filePath + * @param string $filePath */ public function __construct($filePath) {} diff --git a/ide/stubs/Phalcon/config/adapter/Yaml.php b/ide/stubs/Phalcon/config/adapter/Yaml.php index 0586b6478..2b3fea43d 100644 --- a/ide/stubs/Phalcon/config/adapter/Yaml.php +++ b/ide/stubs/Phalcon/config/adapter/Yaml.php @@ -4,29 +4,36 @@ /** * Phalcon\Config\Adapter\Yaml + * * Reads YAML files and converts them to Phalcon\Config objects. + * * Given the following configuration file: + * * * phalcon: - * baseuri: /phalcon/ - * controllersDir: !approot /app/controllers/ + * baseuri: /phalcon/ + * controllersDir: !approot /app/controllers/ * models: - * metadata: memory + * metadata: memory * + * * You can read it as follows: + * * * define( - * "APPROOT", - * dirname(__DIR__) + * "APPROOT", + * dirname(__DIR__) * ); + * * $config = new \Phalcon\Config\Adapter\Yaml( - * "path/config.yaml", - * [ - * "!approot" => function($value) { - * return APPROOT . $value; - * }, - * ] + * "path/config.yaml", + * [ + * "!approot" => function($value) { + * return APPROOT . $value; + * }, + * ] * ); + * * echo $config->phalcon->controllersDir; * echo $config->phalcon->baseuri; * echo $config->models->metadata; @@ -38,9 +45,10 @@ class Yaml extends \Phalcon\Config /** * Phalcon\Config\Adapter\Yaml constructor * + * * @throws \Phalcon\Config\Exception - * @param string $filePath - * @param array $callbacks + * @param string $filePath + * @param array $callbacks */ public function __construct($filePath, array $callbacks = null) {} diff --git a/ide/stubs/Phalcon/crypt/Exception.php b/ide/stubs/Phalcon/crypt/Exception.php index 5af7d614f..757d5a599 100644 --- a/ide/stubs/Phalcon/crypt/Exception.php +++ b/ide/stubs/Phalcon/crypt/Exception.php @@ -4,7 +4,9 @@ /** * Phalcon\Crypt\Exception + * * Exceptions thrown in Phalcon\Crypt use this class + * */ class Exception extends \Phalcon\Exception { diff --git a/ide/stubs/Phalcon/db/Adapter.php b/ide/stubs/Phalcon/db/Adapter.php index 7b1466f42..397e14d08 100644 --- a/ide/stubs/Phalcon/db/Adapter.php +++ b/ide/stubs/Phalcon/db/Adapter.php @@ -4,6 +4,7 @@ /** * Phalcon\Db\Adapter + * * Base class for Phalcon\Db adapters */ abstract class Adapter implements \Phalcon\Db\AdapterInterface, \Phalcon\Events\EventsAwareInterface @@ -11,6 +12,7 @@ abstract class Adapter implements \Phalcon\Db\AdapterInterface, \Phalcon\Events\ /** * Event Manager * + * * @var Phalcon\Events\Manager */ protected $_eventsManager; @@ -38,6 +40,7 @@ abstract class Adapter implements \Phalcon\Db\AdapterInterface, \Phalcon\Events\ /** * Active connection ID * + * * @var long */ protected $_connectionId; @@ -45,6 +48,7 @@ abstract class Adapter implements \Phalcon\Db\AdapterInterface, \Phalcon\Events\ /** * Active SQL Statement * + * * @var string */ protected $_sqlStatement; @@ -52,6 +56,7 @@ abstract class Adapter implements \Phalcon\Db\AdapterInterface, \Phalcon\Events\ /** * Active SQL bound parameter variables * + * * @var string */ protected $_sqlVariables; @@ -59,6 +64,7 @@ abstract class Adapter implements \Phalcon\Db\AdapterInterface, \Phalcon\Events\ /** * Active SQL Bind Types * + * * @var string */ protected $_sqlBindTypes; @@ -92,679 +98,723 @@ public function getType() {} /** * Active SQL bound parameter variables * - * @return string + * @return string */ public function getSqlVariables() {} /** * Phalcon\Db\Adapter constructor * - * @param array $descriptor + * @param array $descriptor */ public function __construct(array $descriptor) {} /** * Sets the event manager * - * @param mixed $eventsManager + * @param \Phalcon\Events\ManagerInterface $eventsManager */ public function setEventsManager(\Phalcon\Events\ManagerInterface $eventsManager) {} /** * Returns the internal event manager * - * @return \Phalcon\Events\ManagerInterface + * @return \Phalcon\Events\ManagerInterface */ public function getEventsManager() {} /** * Sets the dialect used to produce the SQL * - * @param mixed $dialect + * @param DialectInterface $dialect */ public function setDialect(DialectInterface $dialect) {} /** * Returns internal dialect instance * - * @return DialectInterface + * @return DialectInterface */ public function getDialect() {} /** * Returns the first row in a SQL query result + * * * // Getting first robot - * $robot = $connection->fetchOne("SELECTFROM robots"); + * $robot = $connection->fetchOne("SELECT FROM robots"); * print_r($robot); + * * // Getting first robot with associative indexes only - * $robot = $connection->fetchOne("SELECTFROM robots", \Phalcon\Db::FETCH_ASSOC); + * $robot = $connection->fetchOne("SELECT FROM robots", \Phalcon\Db::FETCH_ASSOC); * print_r($robot); * * - * @param string $sqlQuery - * @param mixed $fetchMode - * @param mixed $bindParams - * @param mixed $bindTypes - * @return array + * @param string $sqlQuery + * @param mixed $fetchMode + * @param mixed $bindParams + * @param mixed $bindTypes + * @return array */ public function fetchOne($sqlQuery, $fetchMode = Db::FETCH_ASSOC, $bindParams = null, $bindTypes = null) {} /** * Dumps the complete result of a query into an array + * * * // Getting all robots with associative indexes only * $robots = $connection->fetchAll( - * "SELECTFROM robots", - * \Phalcon\Db::FETCH_ASSOC + * "SELECT FROM robots", + * \Phalcon\Db::FETCH_ASSOC * ); + * * foreach ($robots as $robot) { - * print_r($robot); + * print_r($robot); * } - * // Getting all robots that contains word "robot" withing the name + * + * // Getting all robots that contains word "robot" withing the name * $robots = $connection->fetchAll( - * "SELECTFROM robots WHERE name LIKE :name", - * \Phalcon\Db::FETCH_ASSOC, - * [ - * "name" => "%robot%", - * ] + * "SELECT FROM robots WHERE name LIKE :name", + * \Phalcon\Db::FETCH_ASSOC, + * [ + * "name" => "%robot%", + * ] * ); * foreach($robots as $robot) { - * print_r($robot); + * print_r($robot); * } * * - * @param string $sqlQuery - * @param int $fetchMode - * @param array $bindParams - * @param array $bindTypes - * @return array + * + * @param string $sqlQuery + * @param int $fetchMode + * @param array $bindParams + * @param array $bindTypes + * @return array */ public function fetchAll($sqlQuery, $fetchMode = Db::FETCH_ASSOC, $bindParams = null, $bindTypes = null) {} /** * Returns the n'th field of first row in a SQL query result + * * * // Getting count of robots - * $robotsCount = $connection->fetchColumn("SELECT count(*) FROM robots"); + * $robotsCount = $connection->fetchColumn("SELECT count() FROM robots"); * print_r($robotsCount); + * * // Getting name of last edited robot * $robot = $connection->fetchColumn( - * "SELECT id, name FROM robots order by modified desc", - * 1 + * "SELECT id, name FROM robots order by modified desc", + * 1 * ); * print_r($robot); * * - * @param string $sqlQuery - * @param array $placeholders - * @param int|string $column - * @return string| + * + * @param string $sqlQuery + * @param array $placeholders + * @param int|string $column + * @return string|bool */ public function fetchColumn($sqlQuery, $placeholders = null, $column = 0) {} /** * Inserts data into a table using custom RDBMS SQL syntax + * * * // Inserting a new robot * $success = $connection->insert( - * "robots", - * ["Astro Boy", 1952], - * ["name", "year"] + * "robots", + * ["Astro Boy", 1952], + * ["name", "year"] * ); + * * // Next SQL sentence is sent to the database system * INSERT INTO `robots` (`name`, `year`) VALUES ("Astro boy", 1952); * * - * @param string|array $table - * @param array $values - * @param mixed $fields - * @param mixed $dataTypes - * @param $array dataTypes - * @return + * + * @param string|array $table + * @param array $values + * @param mixed $fields + * @param mixed $dataTypes + * @param $array dataTypes + * @return bool */ public function insert($table, array $values, $fields = null, $dataTypes = null) {} /** * Inserts data into a table using custom RBDM SQL syntax + * * * // Inserting a new robot * $success = $connection->insertAsDict( - * "robots", - * [ - * "name" => "Astro Boy", - * "year" => 1952, - * ] + * "robots", + * [ + * "name" => "Astro Boy", + * "year" => 1952, + * ] * ); + * * // Next SQL sentence is sent to the database system * INSERT INTO `robots` (`name`, `year`) VALUES ("Astro boy", 1952); * * - * @param mixed $table - * @param mixed $data - * @param mixed $dataTypes - * @param $string table - * @param $array dataTypes - * @return + * + * @param mixed $table + * @param mixed $data + * @param mixed $dataTypes + * @param $string table + * @param $array dataTypes + * @return bool */ public function insertAsDict($table, $data, $dataTypes = null) {} /** * Updates data on a table using custom RBDM SQL syntax + * * * // Updating existing robot * $success = $connection->update( - * "robots", - * ["name"], - * ["New Astro Boy"], - * "id = 101" + * "robots", + * ["name"], + * ["New Astro Boy"], + * "id = 101" * ); + * * // Next SQL sentence is sent to the database system * UPDATE `robots` SET `name` = "Astro boy" WHERE id = 101 + * * // Updating existing robot with array condition and $dataTypes * $success = $connection->update( - * "robots", - * ["name"], - * ["New Astro Boy"], - * [ - * "conditions" => "id = ?", - * "bind" => [$some_unsafe_id], - * "bindTypes" => [PDO::PARAM_INT], // use only if you use $dataTypes param - * ], - * [ - * PDO::PARAM_STR - * ] + * "robots", + * ["name"], + * ["New Astro Boy"], + * [ + * "conditions" => "id = ?", + * "bind" => [$some_unsafe_id], + * "bindTypes" => [PDO::PARAM_INT], // use only if you use $dataTypes param + * ], + * [ + * PDO::PARAM_STR + * ] * ); + * * + * * Warning! If $whereCondition is string it not escaped. * - * @param string|array $table - * @param mixed $fields - * @param mixed $values - * @param mixed $whereCondition - * @param mixed $dataTypes - * @param $array dataTypes - * @param $string|array whereCondition - * @return + * + * @param string|array $table + * @param mixed $fields + * @param mixed $values + * @param mixed $whereCondition + * @param mixed $dataTypes + * @param $array dataTypes + * @param $string|array whereCondition + * @return bool */ public function update($table, $fields, $values, $whereCondition = null, $dataTypes = null) {} /** * Updates data on a table using custom RBDM SQL syntax * Another, more convenient syntax + * * * // Updating existing robot * $success = $connection->updateAsDict( - * "robots", - * [ - * "name" => "New Astro Boy", - * ], - * "id = 101" + * "robots", + * [ + * "name" => "New Astro Boy", + * ], + * "id = 101" * ); + * * // Next SQL sentence is sent to the database system * UPDATE `robots` SET `name` = "Astro boy" WHERE id = 101 * * - * @param mixed $table - * @param mixed $data - * @param mixed $whereCondition - * @param mixed $dataTypes - * @param $string whereCondition - * @param $array dataTypes - * @return + * + * @param mixed $table + * @param mixed $data + * @param mixed $whereCondition + * @param mixed $dataTypes + * @param $string whereCondition + * @param $array dataTypes + * @return bool */ public function updateAsDict($table, $data, $whereCondition = null, $dataTypes = null) {} /** * Deletes data from a table using custom RBDM SQL syntax + * * * // Deleting existing robot * $success = $connection->delete( - * "robots", - * "id = 101" + * "robots", + * "id = 101" * ); + * * // Next SQL sentence is generated * DELETE FROM `robots` WHERE `id` = 101 * * - * @param string|array $table - * @param string $whereCondition - * @param array $placeholders - * @param array $dataTypes - * @return boolean + * + * @param string|array $table + * @param string $whereCondition + * @param array $placeholders + * @param array $dataTypes + * @return bool */ public function delete($table, $whereCondition = null, $placeholders = null, $dataTypes = null) {} /** * Escapes a column/table/schema name + * * * $escapedTable = $connection->escapeIdentifier( - * "robots" + * "robots" * ); + * * $escapedTable = $connection->escapeIdentifier( - * [ - * "store", - * "robots", - * ] + * [ + * "store", + * "robots", + * ] * ); * * - * @param array|string $identifier - * @return string + * + * @param array|string $identifier + * @return string */ public function escapeIdentifier($identifier) {} /** * Gets a list of columns * + * * @param array columnList * @return string - * @param mixed $columnList - * @return string + * @param mixed $columnList + * @return string */ public function getColumnList($columnList) {} /** * Appends a LIMIT clause to $sqlQuery argument + * * - * echo $connection->limit("SELECTFROM robots", 5); + * echo $connection->limit("SELECT FROM robots", 5); * * - * @param string $sqlQuery - * @param int $number - * @return string + * @param string $sqlQuery + * @param int $number + * @return string */ public function limit($sqlQuery, $number) {} /** * Generates SQL checking for the existence of a schema.table + * * * var_dump( - * $connection->tableExists("blog", "posts") + * $connection->tableExists("blog", "posts") * ); * * - * @param string $tableName - * @param string $schemaName - * @return bool + * @param string $tableName + * @param string $schemaName + * @return bool */ public function tableExists($tableName, $schemaName = null) {} /** * Generates SQL checking for the existence of a schema.view + * * * var_dump( - * $connection->viewExists("active_users", "posts") + * $connection->viewExists("active_users", "posts") * ); * * - * @param string $viewName - * @param string $schemaName - * @return bool + * @param string $viewName + * @param string $schemaName + * @return bool */ public function viewExists($viewName, $schemaName = null) {} /** * Returns a SQL modified with a FOR UPDATE clause * - * @param string $sqlQuery - * @return string + * @param string $sqlQuery + * @return string */ public function forUpdate($sqlQuery) {} /** * Returns a SQL modified with a LOCK IN SHARE MODE clause * - * @param string $sqlQuery - * @return string + * @param string $sqlQuery + * @return string */ public function sharedLock($sqlQuery) {} /** * Creates a table * - * @param string $tableName - * @param string $schemaName - * @param array $definition - * @return bool + * @param string $tableName + * @param string $schemaName + * @param array $definition + * @return bool */ public function createTable($tableName, $schemaName, array $definition) {} /** * Drops a table from a schema/database * - * @param string $tableName - * @param string $schemaName - * @param bool $ifExists - * @return bool + * @param string $tableName + * @param string $schemaName + * @param bool $ifExists + * @return bool */ public function dropTable($tableName, $schemaName = null, $ifExists = true) {} /** * Creates a view * - * @param string $viewName - * @param array $definition - * @param mixed $schemaName - * @return bool + * @param string $viewName + * @param array $definition + * @param mixed $schemaName + * @return bool */ public function createView($viewName, array $definition, $schemaName = null) {} /** * Drops a view * - * @param string $viewName - * @param string $schemaName - * @param bool $ifExists - * @return bool + * @param string $viewName + * @param string $schemaName + * @param bool $ifExists + * @return bool */ public function dropView($viewName, $schemaName = null, $ifExists = true) {} /** * Adds a column to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $column - * @return bool + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\ColumnInterface $column + * @return bool */ public function addColumn($tableName, $schemaName, \Phalcon\Db\ColumnInterface $column) {} /** * Modifies a table column based on a definition * - * @param string $tableName - * @param string $schemaName - * @param mixed $column - * @param mixed $currentColumn - * @return bool + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\ColumnInterface $column + * @param \Phalcon\Db\ColumnInterface $currentColumn + * @return bool */ public function modifyColumn($tableName, $schemaName, \Phalcon\Db\ColumnInterface $column, \Phalcon\Db\ColumnInterface $currentColumn = null) {} /** * Drops a column from a table * - * @param string $tableName - * @param string $schemaName - * @param string $columnName - * @return bool + * @param string $tableName + * @param string $schemaName + * @param string $columnName + * @return bool */ public function dropColumn($tableName, $schemaName, $columnName) {} /** * Adds an index to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $index - * @return bool + * @param string $tableName + * @param string $schemaName + * @param IndexInterface $index + * @return bool */ public function addIndex($tableName, $schemaName, IndexInterface $index) {} /** * Drop an index from a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $indexName - * @return bool + * @param string $tableName + * @param string $schemaName + * @param mixed $indexName + * @return bool */ public function dropIndex($tableName, $schemaName, $indexName) {} /** * Adds a primary key to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $index - * @return bool + * @param string $tableName + * @param string $schemaName + * @param IndexInterface $index + * @return bool */ public function addPrimaryKey($tableName, $schemaName, IndexInterface $index) {} /** * Drops a table's primary key * - * @param string $tableName - * @param string $schemaName - * @return bool + * @param string $tableName + * @param string $schemaName + * @return bool */ public function dropPrimaryKey($tableName, $schemaName) {} /** * Adds a foreign key to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $reference - * @return bool + * @param string $tableName + * @param string $schemaName + * @param ReferenceInterface $reference + * @return bool */ public function addForeignKey($tableName, $schemaName, ReferenceInterface $reference) {} /** * Drops a foreign key from a table * - * @param string $tableName - * @param string $schemaName - * @param string $referenceName - * @return bool + * @param string $tableName + * @param string $schemaName + * @param string $referenceName + * @return bool */ public function dropForeignKey($tableName, $schemaName, $referenceName) {} /** * Returns the SQL column definition from a column * - * @param mixed $column - * @return string + * @param \Phalcon\Db\ColumnInterface $column + * @return string */ public function getColumnDefinition(\Phalcon\Db\ColumnInterface $column) {} /** * List all tables on a database + * * * print_r( - * $connection->listTables("blog") + * $connection->listTables("blog") * ); * * - * @param string $schemaName - * @return array + * @param string $schemaName + * @return array */ public function listTables($schemaName = null) {} /** * List all views on a database + * * * print_r( - * $connection->listViews("blog") + * $connection->listViews("blog") * ); * * - * @param string $schemaName - * @return array + * @param string $schemaName + * @return array */ public function listViews($schemaName = null) {} /** * Lists table indexes + * * * print_r( - * $connection->describeIndexes("robots_parts") + * $connection->describeIndexes("robots_parts") * ); * * + * * @param string table * @param string schema * @return Phalcon\Db\Index[] - * @param string $table - * @param mixed $schema - * @return Index[] + * @param string $table + * @param mixed $schema + * @return Index[] */ public function describeIndexes($table, $schema = null) {} /** * Lists table references + * * * print_r( - * $connection->describeReferences("robots_parts") + * $connection->describeReferences("robots_parts") * ); * * - * @param string $table - * @param string $schema - * @return Reference[] + * @param string $table + * @param string $schema + * @return Reference[] */ public function describeReferences($table, $schema = null) {} /** * Gets creation options from a table + * * * print_r( - * $connection->tableOptions("robots") + * $connection->tableOptions("robots") * ); * * - * @param string $tableName - * @param string $schemaName - * @return array + * @param string $tableName + * @param string $schemaName + * @return array */ public function tableOptions($tableName, $schemaName = null) {} /** * Creates a new savepoint * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function createSavepoint($name) {} /** * Releases given savepoint * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function releaseSavepoint($name) {} /** * Rollbacks given savepoint * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function rollbackSavepoint($name) {} /** * Set if nested transactions should use savepoints * - * @param bool $nestedTransactionsWithSavepoints - * @return AdapterInterface + * @param bool $nestedTransactionsWithSavepoints + * @return AdapterInterface */ public function setNestedTransactionsWithSavepoints($nestedTransactionsWithSavepoints) {} /** * Returns if nested transactions should use savepoints * - * @return bool + * @return bool */ public function isNestedTransactionsWithSavepoints() {} /** * Returns the savepoint name to use for nested transactions * - * @return string + * @return string */ public function getNestedTransactionSavepointName() {} /** * Returns the default identity value to be inserted in an identity column + * * * // Inserting a new robot with a valid default value for the column 'id' * $success = $connection->insert( - * "robots", - * [ - * $connection->getDefaultIdValue(), - * "Astro Boy", - * 1952, - * ], - * [ - * "id", - * "name", - * "year", - * ] + * "robots", + * [ + * $connection->getDefaultIdValue(), + * "Astro Boy", + * 1952, + * ], + * [ + * "id", + * "name", + * "year", + * ] * ); * * - * @return RawValue + * @return RawValue */ public function getDefaultIdValue() {} /** * Returns the default value to make the RBDM use the default value declared in the table definition + * * * // Inserting a new robot with a valid default value for the column 'year' * $success = $connection->insert( - * "robots", - * [ - * "Astro Boy", - * $connection->getDefaultValue() - * ], - * [ - * "name", - * "year", - * ] + * "robots", + * [ + * "Astro Boy", + * $connection->getDefaultValue() + * ], + * [ + * "name", + * "year", + * ] * ); * * - * @return RawValue + * @return RawValue */ public function getDefaultValue() {} /** * Check whether the database system requires a sequence to produce auto-numeric values * - * @return bool + * @return bool */ public function supportSequences() {} /** * Check whether the database system requires an explicit value for identity columns * - * @return bool + * @return bool */ public function useExplicitIdValue() {} /** * Return descriptor used to connect to the active database * - * @return array + * @return array */ public function getDescriptor() {} /** * Gets the active connection unique identifier * - * @return string + * + * @return string */ public function getConnectionId() {} /** * Active SQL statement in the object * - * @return string + * @return string */ public function getSQLStatement() {} /** * Active SQL statement in the object without replace bound parameters * - * @return string + * @return string */ public function getRealSQLStatement() {} /** * Active SQL statement in the object * - * @return array + * + * @return array */ public function getSQLBindTypes() {} diff --git a/ide/stubs/Phalcon/db/AdapterInterface.php b/ide/stubs/Phalcon/db/AdapterInterface.php index 7140cbc7d..2ed54cfff 100644 --- a/ide/stubs/Phalcon/db/AdapterInterface.php +++ b/ide/stubs/Phalcon/db/AdapterInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Db\AdapterInterface + * * Interface for Phalcon\Db adapters */ interface AdapterInterface @@ -12,329 +13,342 @@ interface AdapterInterface /** * Returns the first row in a SQL query result * - * @param string $sqlQuery - * @param int $fetchMode - * @param int $placeholders - * @return array + * + * @param string $sqlQuery + * @param int $fetchMode + * @param int $placeholders + * @return array */ public function fetchOne($sqlQuery, $fetchMode = 2, $placeholders = null); /** * Dumps the complete result of a query into an array * - * @param string $sqlQuery - * @param int $fetchMode - * @param int $placeholders - * @return array + * + * @param string $sqlQuery + * @param int $fetchMode + * @param int $placeholders + * @return array */ public function fetchAll($sqlQuery, $fetchMode = 2, $placeholders = null); /** * Inserts data into a table using custom RDBMS SQL syntax * - * @param mixed $table - * @param array $values - * @param mixed $fields - * @param mixed $dataTypes - * @param $string table - * @param $array dataTypes - * @return + * + * @param mixed $table + * @param array $values + * @param mixed $fields + * @param mixed $dataTypes + * @param $string table + * @param $array dataTypes + * @return */ public function insert($table, array $values, $fields = null, $dataTypes = null); /** * Updates data on a table using custom RDBMS SQL syntax * - * @param mixed $table - * @param mixed $fields - * @param mixed $values - * @param mixed $whereCondition - * @param mixed $dataTypes - * @param $string whereCondition - * @param $array dataTypes - * @return + * + * @param mixed $table + * @param mixed $fields + * @param mixed $values + * @param mixed $whereCondition + * @param mixed $dataTypes + * @param $string whereCondition + * @param $array dataTypes + * @return */ public function update($table, $fields, $values, $whereCondition = null, $dataTypes = null); /** * Deletes data from a table using custom RDBMS SQL syntax * - * @param string $table - * @param string $whereCondition - * @param array $placeholders - * @param array $dataTypes - * @return boolean + * + * @param string $table + * @param string $whereCondition + * @param array $placeholders + * @param array $dataTypes + * @return boolean */ public function delete($table, $whereCondition = null, $placeholders = null, $dataTypes = null); /** * Gets a list of columns * + * * @param array columnList * @return string - * @param mixed $columnList + * @param mixed $columnList */ public function getColumnList($columnList); /** * Appends a LIMIT clause to sqlQuery argument * - * @param mixed $sqlQuery - * @param mixed $number - * @param $string sqlQuery - * @param $int number - * @return + * + * @param mixed $sqlQuery + * @param mixed $number + * @param $string sqlQuery + * @param $int number + * @return */ public function limit($sqlQuery, $number); /** * Generates SQL checking for the existence of a schema.table * - * @param string $tableName - * @param string $schemaName - * @return bool + * @param string $tableName + * @param string $schemaName + * @return bool */ public function tableExists($tableName, $schemaName = null); /** * Generates SQL checking for the existence of a schema.view * - * @param string $viewName - * @param string $schemaName - * @return bool + * @param string $viewName + * @param string $schemaName + * @return bool */ public function viewExists($viewName, $schemaName = null); /** * Returns a SQL modified with a FOR UPDATE clause * - * @param string $sqlQuery - * @return string + * @param string $sqlQuery + * @return string */ public function forUpdate($sqlQuery); /** * Returns a SQL modified with a LOCK IN SHARE MODE clause * - * @param string $sqlQuery - * @return string + * @param string $sqlQuery + * @return string */ public function sharedLock($sqlQuery); /** * Creates a table * - * @param string $tableName - * @param string $schemaName - * @param array $definition - * @return bool + * @param string $tableName + * @param string $schemaName + * @param array $definition + * @return bool */ public function createTable($tableName, $schemaName, array $definition); /** * Drops a table from a schema/database * - * @param string $tableName - * @param string $schemaName - * @param bool $ifExists - * @return bool + * @param string $tableName + * @param string $schemaName + * @param bool $ifExists + * @return bool */ public function dropTable($tableName, $schemaName = null, $ifExists = true); /** * Creates a view * - * @param string $viewName - * @param array $definition - * @param string $schemaName - * @return bool + * @param string $viewName + * @param array $definition + * @param string $schemaName + * @return bool */ public function createView($viewName, array $definition, $schemaName = null); /** * Drops a view * - * @param string $viewName - * @param string $schemaName - * @param bool $ifExists - * @return bool + * @param string $viewName + * @param string $schemaName + * @param bool $ifExists + * @return bool */ public function dropView($viewName, $schemaName = null, $ifExists = true); /** * Adds a column to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $column - * @return bool + * @param string $tableName + * @param string $schemaName + * @param ColumnInterface $column + * @return bool */ public function addColumn($tableName, $schemaName, ColumnInterface $column); /** * Modifies a table column based on a definition * - * @param string $tableName - * @param string $schemaName - * @param mixed $column - * @param mixed $currentColumn - * @return bool + * @param string $tableName + * @param string $schemaName + * @param ColumnInterface $column + * @param ColumnInterface $currentColumn + * @return bool */ public function modifyColumn($tableName, $schemaName, ColumnInterface $column, ColumnInterface $currentColumn = null); /** * Drops a column from a table * - * @param string $tableName - * @param string $schemaName - * @param string $columnName - * @return bool + * @param string $tableName + * @param string $schemaName + * @param string $columnName + * @return bool */ public function dropColumn($tableName, $schemaName, $columnName); /** * Adds an index to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $index - * @return bool + * @param string $tableName + * @param string $schemaName + * @param IndexInterface $index + * @return bool */ public function addIndex($tableName, $schemaName, IndexInterface $index); /** * Drop an index from a table * - * @param string $tableName - * @param string $schemaName - * @param string $indexName - * @return bool + * @param string $tableName + * @param string $schemaName + * @param string $indexName + * @return bool */ public function dropIndex($tableName, $schemaName, $indexName); /** * Adds a primary key to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $index - * @return bool + * @param string $tableName + * @param string $schemaName + * @param IndexInterface $index + * @return bool */ public function addPrimaryKey($tableName, $schemaName, IndexInterface $index); /** * Drops primary key from a table * - * @param string $tableName - * @param string $schemaName - * @return bool + * @param string $tableName + * @param string $schemaName + * @return bool */ public function dropPrimaryKey($tableName, $schemaName); /** * Adds a foreign key to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $reference - * @return bool + * @param string $tableName + * @param string $schemaName + * @param ReferenceInterface $reference + * @return bool */ public function addForeignKey($tableName, $schemaName, ReferenceInterface $reference); /** * Drops a foreign key from a table * - * @param string $tableName - * @param string $schemaName - * @param string $referenceName - * @return bool + * @param string $tableName + * @param string $schemaName + * @param string $referenceName + * @return bool */ public function dropForeignKey($tableName, $schemaName, $referenceName); /** * Returns the SQL column definition from a column * - * @param mixed $column - * @return string + * @param ColumnInterface $column + * @return string */ public function getColumnDefinition(ColumnInterface $column); /** * List all tables on a database * - * @param string $schemaName - * @return array + * @param string $schemaName + * @return array */ public function listTables($schemaName = null); /** * List all views on a database * - * @param string $schemaName - * @return array + * @param string $schemaName + * @return array */ public function listViews($schemaName = null); /** * Return descriptor used to connect to the active database * - * @return array + * + * @return array */ public function getDescriptor(); /** * Gets the active connection unique identifier * - * @return string + * + * @return string */ public function getConnectionId(); /** * Active SQL statement in the object * - * @return string + * @return string */ public function getSQLStatement(); /** * Active SQL statement in the object without replace bound parameters * - * @return string + * @return string */ public function getRealSQLStatement(); /** * Active SQL statement in the object * - * @return array + * + * @return array */ public function getSQLVariables(); /** * Active SQL statement in the object * - * @return array + * + * @return array */ public function getSQLBindTypes(); /** * Returns type of database system the adapter is used for * - * @return string + * + * @return string */ public function getType(); /** * Returns the name of the dialect used * - * @return string + * + * @return string */ public function getDialectType(); /** * Returns internal dialect instance * - * @return DialectInterface + * @return DialectInterface */ public function getDialect(); @@ -342,8 +356,8 @@ public function getDialect(); * This method is automatically called in \Phalcon\Db\Adapter\Pdo constructor. * Call it when you need to restore a database connection * - * @param array $descriptor - * @return bool + * @param array $descriptor + * @return bool */ public function connect(array $descriptor = null); @@ -351,10 +365,10 @@ public function connect(array $descriptor = null); * Sends SQL statements to the database server returning the success state. * Use this method only when the SQL statement sent to the server return rows * - * @param string $sqlStatement - * @param mixed $placeholders - * @param mixed $dataTypes - * @return bool|ResultInterface + * @param string $sqlStatement + * @param mixed $placeholders + * @param mixed $dataTypes + * @return bool|ResultInterface */ public function query($sqlStatement, $placeholders = null, $dataTypes = null); @@ -362,17 +376,17 @@ public function query($sqlStatement, $placeholders = null, $dataTypes = null); * Sends SQL statements to the database server returning the success state. * Use this method only when the SQL statement sent to the server doesn't return any rows * - * @param string $sqlStatement - * @param mixed $placeholders - * @param mixed $dataTypes - * @return bool + * @param string $sqlStatement + * @param mixed $placeholders + * @param mixed $dataTypes + * @return bool */ public function execute($sqlStatement, $placeholders = null, $dataTypes = null); /** * Returns the number of affected rows by the last INSERT/UPDATE/DELETE reported by the database system * - * @return int + * @return int */ public function affectedRows(); @@ -380,172 +394,174 @@ public function affectedRows(); * Closes active connection returning success. Phalcon automatically closes * and destroys active connections within Phalcon\Db\Pool * - * @return bool + * @return bool */ public function close(); /** * Escapes a column/table/schema name * - * @param string $identifier - * @return string + * + * @param string $identifier + * @return string */ public function escapeIdentifier($identifier); /** * Escapes a value to avoid SQL injections * - * @param string $str - * @return string + * @param string $str + * @return string */ public function escapeString($str); /** * Returns insert id for the auto_increment column inserted in the last SQL statement * - * @param string $sequenceName - * @return int + * + * @param string $sequenceName + * @return int */ public function lastInsertId($sequenceName = null); /** * Starts a transaction in the connection * - * @param bool $nesting - * @return bool + * @param bool $nesting + * @return bool */ public function begin($nesting = true); /** * Rollbacks the active transaction in the connection * - * @param bool $nesting - * @return bool + * @param bool $nesting + * @return bool */ public function rollback($nesting = true); /** * Commits the active transaction in the connection * - * @param bool $nesting - * @return bool + * @param bool $nesting + * @return bool */ public function commit($nesting = true); /** * Checks whether connection is under database transaction * - * @return bool + * @return bool */ public function isUnderTransaction(); /** * Return internal PDO handler * - * @return \Pdo + * @return \Pdo */ public function getInternalHandler(); /** * Lists table indexes * - * @param string $table - * @param string $schema - * @return IndexInterface[] + * @param string $table + * @param string $schema + * @return IndexInterface[] */ public function describeIndexes($table, $schema = null); /** * Lists table references * - * @param string $table - * @param string $schema - * @return ReferenceInterface[] + * @param string $table + * @param string $schema + * @return ReferenceInterface[] */ public function describeReferences($table, $schema = null); /** * Gets creation options from a table * - * @param string $tableName - * @param string $schemaName - * @return array + * @param string $tableName + * @param string $schemaName + * @return array */ public function tableOptions($tableName, $schemaName = null); /** * Check whether the database system requires an explicit value for identity columns * - * @return bool + * @return bool */ public function useExplicitIdValue(); /** * Return the default identity value to insert in an identity column * - * @return RawValue + * @return RawValue */ public function getDefaultIdValue(); /** * Check whether the database system requires a sequence to produce auto-numeric values * - * @return bool + * @return bool */ public function supportSequences(); /** * Creates a new savepoint * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function createSavepoint($name); /** * Releases given savepoint * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function releaseSavepoint($name); /** * Rollbacks given savepoint * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function rollbackSavepoint($name); /** * Set if nested transactions should use savepoints * - * @param bool $nestedTransactionsWithSavepoints - * @return AdapterInterface + * @param bool $nestedTransactionsWithSavepoints + * @return AdapterInterface */ public function setNestedTransactionsWithSavepoints($nestedTransactionsWithSavepoints); /** * Returns if nested transactions should use savepoints * - * @return bool + * @return bool */ public function isNestedTransactionsWithSavepoints(); /** * Returns the savepoint name to use for nested transactions * - * @return string + * @return string */ public function getNestedTransactionSavepointName(); /** * Returns an array of Phalcon\Db\Column objects describing a table * - * @param string $table - * @param string $schema - * @return ColumnInterface[] + * @param string $table + * @param string $schema + * @return ColumnInterface[] */ public function describeColumns($table, $schema = null); diff --git a/ide/stubs/Phalcon/db/Column.php b/ide/stubs/Phalcon/db/Column.php index d0acb9f35..5735d1d7e 100644 --- a/ide/stubs/Phalcon/db/Column.php +++ b/ide/stubs/Phalcon/db/Column.php @@ -4,21 +4,25 @@ /** * Phalcon\Db\Column + * * Allows to define columns to be used on create or alter table operations + * * * use Phalcon\Db\Column as Column; + * * // Column definition * $column = new Column( - * "id", - * [ - * "type" => Column::TYPE_INTEGER, - * "size" => 10, - * "unsigned" => true, - * "notNull" => true, - * "autoIncrement" => true, - * "first" => true, - * ] + * "id", + * [ + * "type" => Column::TYPE_INTEGER, + * "size" => 10, + * "unsigned" => true, + * "notNull" => true, + * "autoIncrement" => true, + * "first" => true, + * ] * ); + * * // Add column to existing table * $connection->addColumn("robots", null, $column); * @@ -72,6 +76,7 @@ class Column implements \Phalcon\Db\ColumnInterface /** * Double abstract data type + * */ const TYPE_DOUBLE = 9; @@ -153,6 +158,7 @@ class Column implements \Phalcon\Db\ColumnInterface /** * Column's name * + * * @var string */ protected $_name; @@ -160,6 +166,7 @@ class Column implements \Phalcon\Db\ColumnInterface /** * Schema which table related is * + * * @var string */ protected $_schemaName; @@ -167,6 +174,7 @@ class Column implements \Phalcon\Db\ColumnInterface /** * Column data type * + * * @var int|string */ protected $_type; @@ -174,6 +182,7 @@ class Column implements \Phalcon\Db\ColumnInterface /** * Column data type reference * + * * @var int */ protected $_typeReference = -1; @@ -181,6 +190,7 @@ class Column implements \Phalcon\Db\ColumnInterface /** * Column data type values * + * * @var array|string */ protected $_typeValues; @@ -193,6 +203,7 @@ class Column implements \Phalcon\Db\ColumnInterface /** * Integer column size * + * * @var int */ protected $_size = 0; @@ -200,6 +211,7 @@ class Column implements \Phalcon\Db\ColumnInterface /** * Integer column number scale * + * * @var int */ protected $_scale = 0; @@ -212,6 +224,7 @@ class Column implements \Phalcon\Db\ColumnInterface /** * Integer column unsigned? * + * * @var boolean */ protected $_unsigned = false; @@ -219,6 +232,7 @@ class Column implements \Phalcon\Db\ColumnInterface /** * Column not nullable? * + * * @var boolean */ protected $_notNull = false; @@ -231,6 +245,7 @@ class Column implements \Phalcon\Db\ColumnInterface /** * Column is autoIncrement? * + * * @var boolean */ protected $_autoIncrement = false; @@ -238,6 +253,7 @@ class Column implements \Phalcon\Db\ColumnInterface /** * Position is first * + * * @var boolean */ protected $_first = false; @@ -245,6 +261,7 @@ class Column implements \Phalcon\Db\ColumnInterface /** * Column Position * + * * @var string */ protected $_after; @@ -258,49 +275,49 @@ class Column implements \Phalcon\Db\ColumnInterface /** * Column's name * - * @return string + * @return string */ public function getName() {} /** * Schema which table related is * - * @return string + * @return string */ public function getSchemaName() {} /** * Column data type * - * @return int|string + * @return int|string */ public function getType() {} /** * Column data type reference * - * @return int + * @return int */ public function getTypeReference() {} /** * Column data type values * - * @return array|string + * @return array|string */ public function getTypeValues() {} /** * Integer column size * - * @return int + * @return int */ public function getSize() {} /** * Integer column number scale * - * @return int + * @return int */ public function getScale() {} @@ -312,79 +329,80 @@ public function getDefault() {} /** * Phalcon\Db\Column constructor * - * @param string $name - * @param array $definition + * @param string $name + * @param array $definition */ public function __construct($name, array $definition) {} /** * Returns true if number column is unsigned * - * @return bool + * @return bool */ public function isUnsigned() {} /** * Not null * - * @return bool + * @return bool */ public function isNotNull() {} /** * Column is part of the primary key? * - * @return bool + * @return bool */ public function isPrimary() {} /** * Auto-Increment * - * @return bool + * @return bool */ public function isAutoIncrement() {} /** * Check whether column have an numeric type * - * @return bool + * @return bool */ public function isNumeric() {} /** * Check whether column have first position in table * - * @return bool + * @return bool */ public function isFirst() {} /** * Check whether field absolute to position in table * - * @return string + * + * @return string */ public function getAfterPosition() {} /** * Returns the type of bind handling * - * @return int + * @return int */ public function getBindType() {} /** * Restores the internal state of a Phalcon\Db\Column object * - * @param array $data - * @return Column + * @param array $data + * @return Column */ public static function __set_state(array $data) {} /** * Check whether column has default value * - * @return bool + * @return bool */ public function hasDefault() {} diff --git a/ide/stubs/Phalcon/db/ColumnInterface.php b/ide/stubs/Phalcon/db/ColumnInterface.php index f4ec8ec7b..062681011 100644 --- a/ide/stubs/Phalcon/db/ColumnInterface.php +++ b/ide/stubs/Phalcon/db/ColumnInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Db\ColumnInterface + * * Interface for Phalcon\Db\Column */ interface ColumnInterface @@ -12,127 +13,143 @@ interface ColumnInterface /** * Returns schema's table related to column * - * @return string + * + * @return string */ public function getSchemaName(); /** * Returns column name * - * @return string + * + * @return string */ public function getName(); /** * Returns column type * - * @return int + * + * @return int */ public function getType(); /** * Returns column type reference * - * @return int + * + * @return int */ public function getTypeReference(); /** * Returns column type values * - * @return int + * + * @return int */ public function getTypeValues(); /** * Returns column size * - * @return int + * + * @return int */ public function getSize(); /** * Returns column scale * - * @return int + * + * @return int */ public function getScale(); /** * Returns true if number column is unsigned * - * @return boolean + * + * @return boolean */ public function isUnsigned(); /** * Not null * - * @return boolean + * + * @return boolean */ public function isNotNull(); /** * Column is part of the primary key? * - * @return boolean + * + * @return boolean */ public function isPrimary(); /** * Auto-Increment * - * @return boolean + * + * @return boolean */ public function isAutoIncrement(); /** * Check whether column have an numeric type * - * @return boolean + * + * @return boolean */ public function isNumeric(); /** * Check whether column have first position in table * - * @return boolean + * + * @return boolean */ public function isFirst(); /** * Check whether field absolute to position in table * - * @return string + * + * @return string */ public function getAfterPosition(); /** * Returns the type of bind handling * - * @return int + * + * @return int */ public function getBindType(); /** * Returns default value of column * - * @return int + * + * @return int */ public function getDefault(); /** * Check whether column has default value * - * @return bool + * @return bool */ public function hasDefault(); /** * Restores the internal state of a Phalcon\Db\Column object * - * @param array $data - * @return ColumnInterface + * @param array $data + * @return ColumnInterface */ public static function __set_state(array $data); diff --git a/ide/stubs/Phalcon/db/Dialect.php b/ide/stubs/Phalcon/db/Dialect.php index 3ee17e416..519d870d9 100644 --- a/ide/stubs/Phalcon/db/Dialect.php +++ b/ide/stubs/Phalcon/db/Dialect.php @@ -4,6 +4,7 @@ /** * Phalcon\Db\Dialect + * * This is the base class to each database dialect. This implements * common methods to transform intermediate code into its RDBMS related syntax */ @@ -19,374 +20,379 @@ abstract class Dialect implements \Phalcon\Db\DialectInterface /** * Registers custom SQL functions * - * @param string $name - * @param callable $customFunction - * @return Dialect + * @param string $name + * @param callable $customFunction + * @return Dialect */ public function registerCustomFunction($name, $customFunction) {} /** * Returns registered functions * - * @return array + * @return array */ public function getCustomFunctions() {} /** * Escape Schema * - * @param string $str - * @param string $escapeChar - * @return string + * @param string $str + * @param string $escapeChar + * @return string */ public final function escapeSchema($str, $escapeChar = null) {} /** * Escape identifiers * - * @param string $str - * @param string $escapeChar - * @return string + * @param string $str + * @param string $escapeChar + * @return string */ public final function escape($str, $escapeChar = null) {} /** * Generates the SQL for LIMIT clause + * * - * $sql = $dialect->limit("SELECTFROM robots", 10); - * echo $sql; // SELECTFROM robots LIMIT 10 - * $sql = $dialect->limit("SELECTFROM robots", [10, 50]); - * echo $sql; // SELECTFROM robots LIMIT 10 OFFSET 50 + * $sql = $dialect->limit("SELECT FROM robots", 10); + * echo $sql; // SELECT FROM robots LIMIT 10 + * + * $sql = $dialect->limit("SELECT FROM robots", [10, 50]); + * echo $sql; // SELECT FROM robots LIMIT 10 OFFSET 50 * * - * @param string $sqlQuery - * @param mixed $number - * @return string + * @param string $sqlQuery + * @param mixed $number + * @return string */ public function limit($sqlQuery, $number) {} /** * Returns a SQL modified with a FOR UPDATE clause + * * - * $sql = $dialect->forUpdate("SELECTFROM robots"); - * echo $sql; // SELECTFROM robots FOR UPDATE + * $sql = $dialect->forUpdate("SELECT FROM robots"); + * echo $sql; // SELECT FROM robots FOR UPDATE * * - * @param string $sqlQuery - * @return string + * @param string $sqlQuery + * @return string */ public function forUpdate($sqlQuery) {} /** * Returns a SQL modified with a LOCK IN SHARE MODE clause + * * - * $sql = $dialect->sharedLock("SELECTFROM robots"); - * echo $sql; // SELECTFROM robots LOCK IN SHARE MODE + * $sql = $dialect->sharedLock("SELECT FROM robots"); + * echo $sql; // SELECT FROM robots LOCK IN SHARE MODE * * - * @param string $sqlQuery - * @return string + * @param string $sqlQuery + * @return string */ public function sharedLock($sqlQuery) {} /** * Gets a list of columns with escaped identifiers + * * * echo $dialect->getColumnList( - * [ - * "column1", - * "column", - * ] + * [ + * "column1", + * "column", + * ] * ); * * - * @param array $columnList - * @param string $escapeChar - * @param mixed $bindCounts - * @return string + * @param array $columnList + * @param string $escapeChar + * @param mixed $bindCounts + * @return string */ public final function getColumnList(array $columnList, $escapeChar = null, $bindCounts = null) {} /** * Resolve Column expressions * - * @param mixed $column - * @param string $escapeChar - * @param mixed $bindCounts - * @return string + * @param mixed $column + * @param string $escapeChar + * @param mixed $bindCounts + * @return string */ public final function getSqlColumn($column, $escapeChar = null, $bindCounts = null) {} /** * Transforms an intermediate representation for an expression into a database system valid expression * - * @param array $expression - * @param string $escapeChar - * @param mixed $bindCounts - * @return string + * @param array $expression + * @param string $escapeChar + * @param mixed $bindCounts + * @return string */ public function getSqlExpression(array $expression, $escapeChar = null, $bindCounts = null) {} /** * Transform an intermediate representation of a schema/table into a database system valid expression * - * @param mixed $table - * @param string $escapeChar - * @return string + * @param mixed $table + * @param string $escapeChar + * @return string */ public final function getSqlTable($table, $escapeChar = null) {} /** * Builds a SELECT statement * - * @param array $definition - * @return string + * @param array $definition + * @return string */ public function select(array $definition) {} /** * Checks whether the platform supports savepoints * - * @return bool + * @return bool */ public function supportsSavepoints() {} /** * Checks whether the platform supports releasing savepoints. * - * @return bool + * @return bool */ public function supportsReleaseSavepoints() {} /** * Generate SQL to create a new savepoint * - * @param string $name - * @return string + * @param string $name + * @return string */ public function createSavepoint($name) {} /** * Generate SQL to release a savepoint * - * @param string $name - * @return string + * @param string $name + * @return string */ public function releaseSavepoint($name) {} /** * Generate SQL to rollback a savepoint * - * @param string $name - * @return string + * @param string $name + * @return string */ public function rollbackSavepoint($name) {} /** * Resolve Column expressions * - * @param array $expression - * @param string $escapeChar - * @param mixed $bindCounts - * @return string + * @param array $expression + * @param string $escapeChar + * @param mixed $bindCounts + * @return string */ protected final function getSqlExpressionScalar(array $expression, $escapeChar = null, $bindCounts = null) {} /** * Resolve object expressions * - * @param array $expression - * @param string $escapeChar - * @param mixed $bindCounts - * @return string + * @param array $expression + * @param string $escapeChar + * @param mixed $bindCounts + * @return string */ protected final function getSqlExpressionObject(array $expression, $escapeChar = null, $bindCounts = null) {} /** * Resolve qualified expressions * - * @param array $expression - * @param string $escapeChar - * @return string + * @param array $expression + * @param string $escapeChar + * @return string */ protected final function getSqlExpressionQualified(array $expression, $escapeChar = null) {} /** * Resolve binary operations expressions * - * @param array $expression - * @param string $escapeChar - * @param mixed $bindCounts - * @return string + * @param array $expression + * @param string $escapeChar + * @param mixed $bindCounts + * @return string */ protected final function getSqlExpressionBinaryOperations(array $expression, $escapeChar = null, $bindCounts = null) {} /** * Resolve unary operations expressions * - * @param array $expression - * @param string $escapeChar - * @param mixed $bindCounts - * @return string + * @param array $expression + * @param string $escapeChar + * @param mixed $bindCounts + * @return string */ protected final function getSqlExpressionUnaryOperations(array $expression, $escapeChar = null, $bindCounts = null) {} /** * Resolve function calls * - * @param array $expression - * @param string $escapeChar - * @param mixed $bindCounts - * @return string + * @param array $expression + * @param string $escapeChar + * @param mixed $bindCounts + * @return string */ protected final function getSqlExpressionFunctionCall(array $expression, $escapeChar = null, $bindCounts) {} /** * Resolve Lists * - * @param array $expression - * @param string $escapeChar - * @param mixed $bindCounts - * @return string + * @param array $expression + * @param string $escapeChar + * @param mixed $bindCounts + * @return string */ protected final function getSqlExpressionList(array $expression, $escapeChar = null, $bindCounts = null) {} /** * Resolve * - * @param array $expression - * @param string $escapeChar - * @return string + * @param array $expression + * @param string $escapeChar + * @return string */ protected final function getSqlExpressionAll(array $expression, $escapeChar = null) {} /** * Resolve CAST of values * - * @param array $expression - * @param string $escapeChar - * @param mixed $bindCounts - * @return string + * @param array $expression + * @param string $escapeChar + * @param mixed $bindCounts + * @return string */ protected final function getSqlExpressionCastValue(array $expression, $escapeChar = null, $bindCounts = null) {} /** * Resolve CONVERT of values encodings * - * @param array $expression - * @param string $escapeChar - * @param mixed $bindCounts - * @return string + * @param array $expression + * @param string $escapeChar + * @param mixed $bindCounts + * @return string */ protected final function getSqlExpressionConvertValue(array $expression, $escapeChar = null, $bindCounts = null) {} /** * Resolve CASE expressions * - * @param array $expression - * @param string $escapeChar - * @param mixed $bindCounts - * @return string + * @param array $expression + * @param string $escapeChar + * @param mixed $bindCounts + * @return string */ protected final function getSqlExpressionCase(array $expression, $escapeChar = null, $bindCounts = null) {} /** * Resolve a FROM clause * - * @param mixed $expression - * @param string $escapeChar - * @return string + * @param mixed $expression + * @param string $escapeChar + * @return string */ protected final function getSqlExpressionFrom($expression, $escapeChar = null) {} /** * Resolve a JOINs clause * - * @param mixed $expression - * @param string $escapeChar - * @param mixed $bindCounts - * @return string + * @param mixed $expression + * @param string $escapeChar + * @param mixed $bindCounts + * @return string */ protected final function getSqlExpressionJoins($expression, $escapeChar = null, $bindCounts = null) {} /** * Resolve a WHERE clause * - * @param mixed $expression - * @param string $escapeChar - * @param mixed $bindCounts - * @return string + * @param mixed $expression + * @param string $escapeChar + * @param mixed $bindCounts + * @return string */ protected final function getSqlExpressionWhere($expression, $escapeChar = null, $bindCounts = null) {} /** * Resolve a GROUP BY clause * - * @param mixed $expression - * @param string $escapeChar - * @param mixed $bindCounts - * @return string + * @param mixed $expression + * @param string $escapeChar + * @param mixed $bindCounts + * @return string */ protected final function getSqlExpressionGroupBy($expression, $escapeChar = null, $bindCounts = null) {} /** * Resolve a HAVING clause * - * @param array $expression - * @param string $escapeChar - * @param mixed $bindCounts - * @return string + * @param array $expression + * @param string $escapeChar + * @param mixed $bindCounts + * @return string */ protected final function getSqlExpressionHaving(array $expression, $escapeChar = null, $bindCounts = null) {} /** * Resolve an ORDER BY clause * - * @param mixed $expression - * @param string $escapeChar - * @param mixed $bindCounts - * @return string + * @param mixed $expression + * @param string $escapeChar + * @param mixed $bindCounts + * @return string */ protected final function getSqlExpressionOrderBy($expression, $escapeChar = null, $bindCounts = null) {} /** * Resolve a LIMIT clause * - * @param mixed $expression - * @param string $escapeChar - * @param mixed $bindCounts - * @return string + * @param mixed $expression + * @param string $escapeChar + * @param mixed $bindCounts + * @return string */ protected final function getSqlExpressionLimit($expression, $escapeChar = null, $bindCounts = null) {} /** * Prepares column for this RDBMS * - * @param string $qualified - * @param string $alias - * @param string $escapeChar - * @return string + * @param string $qualified + * @param string $alias + * @param string $escapeChar + * @return string */ protected function prepareColumnAlias($qualified, $alias = null, $escapeChar = null) {} /** * Prepares table for this RDBMS * - * @param string $table - * @param string $schema - * @param string $alias - * @param string $escapeChar - * @return string + * @param string $table + * @param string $schema + * @param string $alias + * @param string $escapeChar + * @return string */ protected function prepareTable($table, $schema = null, $alias = null, $escapeChar = null) {} /** * Prepares qualified for this RDBMS * - * @param string $column - * @param string $domain - * @param string $escapeChar - * @return string + * @param string $column + * @param string $domain + * @param string $escapeChar + * @return string */ protected function prepareQualified($column, $domain = null, $escapeChar = null) {} diff --git a/ide/stubs/Phalcon/db/DialectInterface.php b/ide/stubs/Phalcon/db/DialectInterface.php index 146b029e3..a0cf718f2 100644 --- a/ide/stubs/Phalcon/db/DialectInterface.php +++ b/ide/stubs/Phalcon/db/DialectInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Db\DialectInterface + * * Interface for Phalcon\Db dialects */ interface DialectInterface @@ -12,278 +13,278 @@ interface DialectInterface /** * Generates the SQL for LIMIT clause * - * @param string $sqlQuery - * @param mixed $number - * @return string + * @param string $sqlQuery + * @param mixed $number + * @return string */ public function limit($sqlQuery, $number); /** * Returns a SQL modified with a FOR UPDATE clause * - * @param string $sqlQuery - * @return string + * @param string $sqlQuery + * @return string */ public function forUpdate($sqlQuery); /** * Returns a SQL modified with a LOCK IN SHARE MODE clause * - * @param string $sqlQuery - * @return string + * @param string $sqlQuery + * @return string */ public function sharedLock($sqlQuery); /** * Builds a SELECT statement * - * @param array $definition - * @return string + * @param array $definition + * @return string */ public function select(array $definition); /** * Gets a list of columns * - * @param array $columnList - * @return string + * @param array $columnList + * @return string */ public function getColumnList(array $columnList); /** * Gets the column name in RDBMS * - * @param mixed $column - * @return string + * @param \Phalcon\Db\ColumnInterface $column + * @return string */ public function getColumnDefinition(\Phalcon\Db\ColumnInterface $column); /** * Generates SQL to add a column to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $column - * @return string + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\ColumnInterface $column + * @return string */ public function addColumn($tableName, $schemaName, \Phalcon\Db\ColumnInterface $column); /** * Generates SQL to modify a column in a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $column - * @param mixed $currentColumn - * @return string + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\ColumnInterface $column + * @param \Phalcon\Db\ColumnInterface $currentColumn + * @return string */ public function modifyColumn($tableName, $schemaName, \Phalcon\Db\ColumnInterface $column, \Phalcon\Db\ColumnInterface $currentColumn = null); /** * Generates SQL to delete a column from a table * - * @param string $tableName - * @param string $schemaName - * @param string $columnName - * @return string + * @param string $tableName + * @param string $schemaName + * @param string $columnName + * @return string */ public function dropColumn($tableName, $schemaName, $columnName); /** * Generates SQL to add an index to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $index - * @return string + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\IndexInterface $index + * @return string */ public function addIndex($tableName, $schemaName, \Phalcon\Db\IndexInterface $index); /** * Generates SQL to delete an index from a table * - * @param string $tableName - * @param string $schemaName - * @param string $indexName - * @return string + * @param string $tableName + * @param string $schemaName + * @param string $indexName + * @return string */ public function dropIndex($tableName, $schemaName, $indexName); /** * Generates SQL to add the primary key to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $index - * @return string + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\IndexInterface $index + * @return string */ public function addPrimaryKey($tableName, $schemaName, \Phalcon\Db\IndexInterface $index); /** * Generates SQL to delete primary key from a table * - * @param string $tableName - * @param string $schemaName - * @return string + * @param string $tableName + * @param string $schemaName + * @return string */ public function dropPrimaryKey($tableName, $schemaName); /** * Generates SQL to add an index to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $reference - * @return string + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\ReferenceInterface $reference + * @return string */ public function addForeignKey($tableName, $schemaName, \Phalcon\Db\ReferenceInterface $reference); /** * Generates SQL to delete a foreign key from a table * - * @param string $tableName - * @param string $schemaName - * @param string $referenceName - * @return string + * @param string $tableName + * @param string $schemaName + * @param string $referenceName + * @return string */ public function dropForeignKey($tableName, $schemaName, $referenceName); /** * Generates SQL to create a table * - * @param string $tableName - * @param string $schemaName - * @param array $definition - * @return string + * @param string $tableName + * @param string $schemaName + * @param array $definition + * @return string */ public function createTable($tableName, $schemaName, array $definition); /** * Generates SQL to create a view * - * @param string $viewName - * @param array $definition - * @param string $schemaName - * @return string + * @param string $viewName + * @param array $definition + * @param string $schemaName + * @return string */ public function createView($viewName, array $definition, $schemaName = null); /** * Generates SQL to drop a table * - * @param string $tableName - * @param string $schemaName - * @return string + * @param string $tableName + * @param string $schemaName + * @return string */ public function dropTable($tableName, $schemaName); /** * Generates SQL to drop a view * - * @param string $viewName - * @param string $schemaName - * @param bool $ifExists - * @return string + * @param string $viewName + * @param string $schemaName + * @param bool $ifExists + * @return string */ public function dropView($viewName, $schemaName = null, $ifExists = true); /** * Generates SQL checking for the existence of a schema.table * - * @param string $tableName - * @param string $schemaName - * @return string + * @param string $tableName + * @param string $schemaName + * @return string */ public function tableExists($tableName, $schemaName = null); /** * Generates SQL checking for the existence of a schema.view * - * @param string $viewName - * @param string $schemaName - * @return string + * @param string $viewName + * @param string $schemaName + * @return string */ public function viewExists($viewName, $schemaName = null); /** * Generates SQL to describe a table * - * @param string $table - * @param string $schema - * @return string + * @param string $table + * @param string $schema + * @return string */ public function describeColumns($table, $schema = null); /** * List all tables in database * - * @param string $schemaName - * @return string + * @param string $schemaName + * @return string */ public function listTables($schemaName = null); /** * Generates SQL to query indexes on a table * - * @param string $table - * @param string $schema - * @return string + * @param string $table + * @param string $schema + * @return string */ public function describeIndexes($table, $schema = null); /** * Generates SQL to query foreign keys on a table * - * @param string $table - * @param string $schema - * @return string + * @param string $table + * @param string $schema + * @return string */ public function describeReferences($table, $schema = null); /** * Generates the SQL to describe the table creation options * - * @param string $table - * @param string $schema - * @return string + * @param string $table + * @param string $schema + * @return string */ public function tableOptions($table, $schema = null); /** * Checks whether the platform supports savepoints * - * @return bool + * @return bool */ public function supportsSavepoints(); /** * Checks whether the platform supports releasing savepoints. * - * @return bool + * @return bool */ public function supportsReleaseSavepoints(); /** * Generate SQL to create a new savepoint * - * @param string $name - * @return string + * @param string $name + * @return string */ public function createSavepoint($name); /** * Generate SQL to release a savepoint * - * @param string $name - * @return string + * @param string $name + * @return string */ public function releaseSavepoint($name); /** * Generate SQL to rollback a savepoint * - * @param string $name - * @return string + * @param string $name + * @return string */ public function rollbackSavepoint($name); diff --git a/ide/stubs/Phalcon/db/Exception.php b/ide/stubs/Phalcon/db/Exception.php index 4b1c5e4a4..a59026291 100644 --- a/ide/stubs/Phalcon/db/Exception.php +++ b/ide/stubs/Phalcon/db/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Db\Exception + * * Exceptions thrown in Phalcon\Db will use this class */ class Exception extends \Phalcon\Exception diff --git a/ide/stubs/Phalcon/db/Index.php b/ide/stubs/Phalcon/db/Index.php index 16f6846d9..1f29343a7 100644 --- a/ide/stubs/Phalcon/db/Index.php +++ b/ide/stubs/Phalcon/db/Index.php @@ -4,6 +4,7 @@ /** * Phalcon\Db\Index + * * Allows to define indexes to be used on tables. Indexes are a common way * to enhance database performance. An index allows the database server to find * and retrieve specific rows much faster than it could do without an index @@ -13,6 +14,7 @@ class Index implements \Phalcon\Db\IndexInterface /** * Index name * + * * @var string */ protected $_name; @@ -20,6 +22,7 @@ class Index implements \Phalcon\Db\IndexInterface /** * Index columns * + * * @var array */ protected $_columns; @@ -27,6 +30,7 @@ class Index implements \Phalcon\Db\IndexInterface /** * Index type * + * * @var string */ protected $_type; @@ -35,38 +39,38 @@ class Index implements \Phalcon\Db\IndexInterface /** * Index name * - * @return string + * @return string */ public function getName() {} /** * Index columns * - * @return array + * @return array */ public function getColumns() {} /** * Index type * - * @return string + * @return string */ public function getType() {} /** * Phalcon\Db\Index constructor * - * @param string $name - * @param array $columns - * @param mixed $type + * @param string $name + * @param array $columns + * @param mixed $type */ public function __construct($name, array $columns, $type = null) {} /** * Restore a Phalcon\Db\Index object from export * - * @param array $data - * @return Index + * @param array $data + * @return Index */ public static function __set_state(array $data) {} diff --git a/ide/stubs/Phalcon/db/IndexInterface.php b/ide/stubs/Phalcon/db/IndexInterface.php index 3b720845b..6125c4106 100644 --- a/ide/stubs/Phalcon/db/IndexInterface.php +++ b/ide/stubs/Phalcon/db/IndexInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Db\IndexInterface + * * Interface for Phalcon\Db\Index */ interface IndexInterface @@ -12,29 +13,32 @@ interface IndexInterface /** * Gets the index name * - * @return string + * + * @return string */ public function getName(); /** * Gets the columns that corresponds the index * - * @return array + * + * @return array */ public function getColumns(); /** * Gets the index type * - * @return string + * + * @return string */ public function getType(); /** * Restore a Phalcon\Db\Index object from export * - * @param array $data - * @return IndexInterface + * @param array $data + * @return IndexInterface */ public static function __set_state(array $data); diff --git a/ide/stubs/Phalcon/db/Profiler.php b/ide/stubs/Phalcon/db/Profiler.php index f533b7abe..af1d5625d 100644 --- a/ide/stubs/Phalcon/db/Profiler.php +++ b/ide/stubs/Phalcon/db/Profiler.php @@ -4,21 +4,28 @@ /** * Phalcon\Db\Profiler + * * Instances of Phalcon\Db can generate execution profiles * on SQL statements sent to the relational database. Profiled * information includes execution time in milliseconds. * This helps you to identify bottlenecks in your applications. + * * * $profiler = new \Phalcon\Db\Profiler(); + * * // Set the connection profiler * $connection->setProfiler($profiler); + * * $sql = "SELECT buyer_name, quantity, product_name * FROM buyers LEFT JOIN products ON * buyers.pid=products.id"; + * * // Execute a SQL statement * $connection->query($sql); + * * // Get the last profile in the profiler * $profile = $profiler->getLastProfile(); + * * echo "SQL Statement: ", $profile->getSQLStatement(), "\n"; * echo "Start Time: ", $profile->getInitialTime(), "\n"; * echo "Final Time: ", $profile->getFinalTime(), "\n"; @@ -30,6 +37,7 @@ class Profiler /** * All the Phalcon\Db\Profiler\Item in the active profile * + * * @var \Phalcon\Db\Profiler\Item[] */ protected $_allProfiles; @@ -37,6 +45,7 @@ class Profiler /** * Active Phalcon\Db\Profiler\Item * + * * @var Phalcon\Db\Profiler\Item */ protected $_activeProfile; @@ -44,6 +53,7 @@ class Profiler /** * Total time spent by all profiles to complete * + * * @var float */ protected $_totalSeconds = 0; @@ -52,52 +62,53 @@ class Profiler /** * Starts the profile of a SQL sentence * - * @param string $sqlStatement - * @param mixed $sqlVariables - * @param mixed $sqlBindTypes - * @return \Phalcon\Db\Profiler + * + * @param string $sqlStatement + * @param mixed $sqlVariables + * @param mixed $sqlBindTypes + * @return Profiler */ public function startProfile($sqlStatement, $sqlVariables = null, $sqlBindTypes = null) {} /** * Stops the active profile * - * @return Profiler + * @return Profiler */ public function stopProfile() {} /** * Returns the total number of SQL statements processed * - * @return int + * @return int */ public function getNumberTotalStatements() {} /** * Returns the total time in seconds spent by the profiles * - * @return double + * @return double */ public function getTotalElapsedSeconds() {} /** * Returns all the processed profiles * - * @return Item[] + * @return \Phalcon\Db\Profiler\Item[] */ public function getProfiles() {} /** * Resets the profiler, cleaning up all the profiles * - * @return Profiler + * @return Profiler */ public function reset() {} /** * Returns the last profile executed in the profiler * - * @return \Phalcon\Db\Profiler\Item + * @return \Phalcon\Db\Profiler\Item */ public function getLastProfile() {} diff --git a/ide/stubs/Phalcon/db/RawValue.php b/ide/stubs/Phalcon/db/RawValue.php index e6397d517..82d99b818 100644 --- a/ide/stubs/Phalcon/db/RawValue.php +++ b/ide/stubs/Phalcon/db/RawValue.php @@ -4,12 +4,17 @@ /** * Phalcon\Db\RawValue + * * This class allows to insert/update raw data without quoting or formatting. + * * The next example shows how to use the MySQL now() function as a field value. + * * * $subscriber = new Subscribers(); + * * $subscriber->email = "andres@phalconphp.com"; * $subscriber->createdAt = new \Phalcon\Db\RawValue("now()"); + * * $subscriber->save(); * */ @@ -18,6 +23,7 @@ class RawValue /** * Raw value without quoting or formatting * + * * @var string */ protected $_value; @@ -26,21 +32,21 @@ class RawValue /** * Raw value without quoting or formatting * - * @return string + * @return string */ public function getValue() {} /** * Raw value without quoting or formatting * - * @return string + * @return string */ public function __toString() {} /** * Phalcon\Db\RawValue constructor * - * @param mixed $value + * @param mixed $value */ public function __construct($value) {} diff --git a/ide/stubs/Phalcon/db/Reference.php b/ide/stubs/Phalcon/db/Reference.php index 81ccd56f5..b2fe575f2 100644 --- a/ide/stubs/Phalcon/db/Reference.php +++ b/ide/stubs/Phalcon/db/Reference.php @@ -4,22 +4,24 @@ /** * Phalcon\Db\Reference + * * Allows to define reference constraints on tables + * * * $reference = new \Phalcon\Db\Reference( - * "field_fk", - * [ - * "referencedSchema" => "invoicing", - * "referencedTable" => "products", - * "columns" => [ - * "product_type", - * "product_code", - * ], - * "referencedColumns" => [ - * "type", - * "code", - * ], - * ] + * "field_fk", + * [ + * "referencedSchema" => "invoicing", + * "referencedTable" => "products", + * "columns" => [ + * "product_type", + * "product_code", + * ], + * "referencedColumns" => [ + * "type", + * "code", + * ], + * ] * ); * */ @@ -28,6 +30,7 @@ class Reference implements \Phalcon\Db\ReferenceInterface /** * Constraint name * + * * @var string */ protected $_name; @@ -41,6 +44,7 @@ class Reference implements \Phalcon\Db\ReferenceInterface /** * Referenced Table * + * * @var string */ protected $_referencedTable; @@ -48,6 +52,7 @@ class Reference implements \Phalcon\Db\ReferenceInterface /** * Local reference columns * + * * @var array */ protected $_columns; @@ -55,6 +60,7 @@ class Reference implements \Phalcon\Db\ReferenceInterface /** * Referenced Columns * + * * @var array */ protected $_referencedColumns; @@ -62,6 +68,7 @@ class Reference implements \Phalcon\Db\ReferenceInterface /** * ON DELETE * + * * @var array */ protected $_onDelete; @@ -69,6 +76,7 @@ class Reference implements \Phalcon\Db\ReferenceInterface /** * ON UPDATE * + * * @var array */ protected $_onUpdate; @@ -77,7 +85,7 @@ class Reference implements \Phalcon\Db\ReferenceInterface /** * Constraint name * - * @return string + * @return string */ public function getName() {} @@ -90,51 +98,51 @@ public function getReferencedSchema() {} /** * Referenced Table * - * @return string + * @return string */ public function getReferencedTable() {} /** * Local reference columns * - * @return array + * @return array */ public function getColumns() {} /** * Referenced Columns * - * @return array + * @return array */ public function getReferencedColumns() {} /** * ON DELETE * - * @return array + * @return array */ public function getOnDelete() {} /** * ON UPDATE * - * @return array + * @return array */ public function getOnUpdate() {} /** * Phalcon\Db\Reference constructor * - * @param string $name - * @param array $definition + * @param string $name + * @param array $definition */ public function __construct($name, array $definition) {} /** * Restore a Phalcon\Db\Reference object from export * - * @param array $data - * @return Reference + * @param array $data + * @return Reference */ public static function __set_state(array $data) {} diff --git a/ide/stubs/Phalcon/db/ReferenceInterface.php b/ide/stubs/Phalcon/db/ReferenceInterface.php index 3828f4958..d65071301 100644 --- a/ide/stubs/Phalcon/db/ReferenceInterface.php +++ b/ide/stubs/Phalcon/db/ReferenceInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Db\Reference + * * Interface for Phalcon\Db\Reference */ interface ReferenceInterface @@ -12,64 +13,72 @@ interface ReferenceInterface /** * Gets the index name * - * @return string + * + * @return string */ public function getName(); /** * Gets the schema where referenced table is * - * @return string + * + * @return string */ public function getSchemaName(); /** * Gets the schema where referenced table is * - * @return string + * + * @return string */ public function getReferencedSchema(); /** * Gets local columns which reference is based * - * @return array + * + * @return array */ public function getColumns(); /** * Gets the referenced table * - * @return string + * + * @return string */ public function getReferencedTable(); /** * Gets referenced columns * - * @return array + * + * @return array */ public function getReferencedColumns(); /** * Gets the referenced on delete * - * @return string + * + * @return string */ public function getOnDelete(); /** * Gets the referenced on update * - * @return string + * + * @return string */ public function getOnUpdate(); /** * Restore a Phalcon\Db\Reference object from export * - * @param array $data - * @return ReferenceInterface + * @param array $data + * @return ReferenceInterface */ public static function __set_state(array $data); diff --git a/ide/stubs/Phalcon/db/ResultInterface.php b/ide/stubs/Phalcon/db/ResultInterface.php index 3aff3d547..5d0ae4a12 100644 --- a/ide/stubs/Phalcon/db/ResultInterface.php +++ b/ide/stubs/Phalcon/db/ResultInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Db\ResultInterface + * * Interface for Phalcon\Db\Result objects */ interface ResultInterface @@ -13,7 +14,8 @@ interface ResultInterface * Allows to executes the statement again. Some database systems don't support scrollable cursors, * So, as cursors are forward only, we need to execute the cursor again to fetch rows from the begining * - * @return boolean + * + * @return boolean */ public function execute(); @@ -21,7 +23,8 @@ public function execute(); * Fetches an array/object of strings that corresponds to the fetched row, or FALSE if there are no more rows. * This method is affected by the active fetch flag set using Phalcon\Db\Result\Pdo::setFetchMode * - * @return mixed + * + * @return mixed */ public function fetch(); @@ -29,7 +32,8 @@ public function fetch(); * Returns an array of strings that corresponds to the fetched row, or FALSE if there are no more rows. * This method is affected by the active fetch flag set using Phalcon\Db\Result\Pdo::setFetchMode * - * @return mixed + * + * @return mixed */ public function fetchArray(); @@ -37,36 +41,41 @@ public function fetchArray(); * Returns an array of arrays containing all the records in the result * This method is affected by the active fetch flag set using Phalcon\Db\Result\Pdo::setFetchMode * - * @return array + * + * @return array */ public function fetchAll(); /** * Gets number of rows returned by a resultset * - * @return int + * + * @return int */ public function numRows(); /** * Moves internal resultset cursor to another position letting us to fetch a certain row * - * @param int $number + * + * @param int $number */ public function dataSeek($number); /** * Changes the fetching mode affecting Phalcon\Db\Result\Pdo::fetch() * - * @param int $fetchMode - * @return bool + * + * @param int $fetchMode + * @return bool */ public function setFetchMode($fetchMode); /** * Gets the internal PDO result object * - * @return \PDOStatement + * + * @return \PDOStatement */ public function getInternalResult(); diff --git a/ide/stubs/Phalcon/db/adapter/Pdo.php b/ide/stubs/Phalcon/db/adapter/Pdo.php index 897b48206..f2add2274 100644 --- a/ide/stubs/Phalcon/db/adapter/Pdo.php +++ b/ide/stubs/Phalcon/db/adapter/Pdo.php @@ -4,16 +4,20 @@ /** * Phalcon\Db\Adapter\Pdo + * * Phalcon\Db\Adapter\Pdo is the Phalcon\Db that internally uses PDO to connect to a database + * * * use Phalcon\Db\Adapter\Pdo\Mysql; + * * $config = [ - * "host" => "localhost", - * "dbname" => "blog", - * "port" => 3306, - * "username" => "sigma", - * "password" => "secret", + * "host" => "localhost", + * "dbname" => "blog", + * "port" => 3306, + * "username" => "sigma", + * "password" => "secret", * ]; + * * $connection = new Mysql($config); * */ @@ -22,6 +26,7 @@ abstract class Pdo extends \Phalcon\Db\Adapter /** * PDO Handler * + * * @var \Pdo */ protected $_pdo; @@ -35,139 +40,156 @@ abstract class Pdo extends \Phalcon\Db\Adapter /** * Constructor for Phalcon\Db\Adapter\Pdo * - * @param array $descriptor + * @param array $descriptor */ public function __construct(array $descriptor) {} /** * This method is automatically called in \Phalcon\Db\Adapter\Pdo constructor. + * * Call it when you need to restore a database connection. + * * * use Phalcon\Db\Adapter\Pdo\Mysql; + * * // Make a connection * $connection = new Mysql( - * [ - * "host" => "localhost", - * "username" => "sigma", - * "password" => "secret", - * "dbname" => "blog", - * "port" => 3306, - * ] + * [ + * "host" => "localhost", + * "username" => "sigma", + * "password" => "secret", + * "dbname" => "blog", + * "port" => 3306, + * ] * ); + * * // Reconnect * $connection->connect(); * * - * @param array $descriptor - * @return bool + * @param array $descriptor + * @return bool */ public function connect(array $descriptor = null) {} /** * Returns a PDO prepared statement to be executed with 'executePrepared' + * * * use Phalcon\Db\Column; + * * $statement = $db->prepare( - * "SELECTFROM robots WHERE name = :name" + * "SELECT FROM robots WHERE name = :name" * ); + * * $result = $connection->executePrepared( - * $statement, - * [ - * "name" => "Voltron", - * ], - * [ - * "name" => Column::BIND_PARAM_INT, - * ] + * $statement, + * [ + * "name" => "Voltron", + * ], + * [ + * "name" => Column::BIND_PARAM_INT, + * ] * ); * * - * @param string $sqlStatement - * @return \PDOStatement + * @param string $sqlStatement + * @return \PDOStatement */ public function prepare($sqlStatement) {} /** * Executes a prepared statement binding. This function uses integer indexes starting from zero + * * * use Phalcon\Db\Column; + * * $statement = $db->prepare( - * "SELECTFROM robots WHERE name = :name" + * "SELECT FROM robots WHERE name = :name" * ); + * * $result = $connection->executePrepared( - * $statement, - * [ - * "name" => "Voltron", - * ], - * [ - * "name" => Column::BIND_PARAM_INT, - * ] + * $statement, + * [ + * "name" => "Voltron", + * ], + * [ + * "name" => Column::BIND_PARAM_INT, + * ] * ); * * - * @param \PDOStatement $statement - * @param array $placeholders - * @param array $dataTypes - * @return \PDOStatement + * + * @param \PDOStatement $statement + * @param array $placeholders + * @param array $dataTypes + * @return \PDOStatement */ public function executePrepared(\PDOStatement $statement, array $placeholders, $dataTypes) {} /** * Sends SQL statements to the database server returning the success state. * Use this method only when the SQL statement sent to the server is returning rows + * * * // Querying data * $resultset = $connection->query( - * "SELECTFROM robots WHERE type = 'mechanical'" + * "SELECT FROM robots WHERE type = 'mechanical'" * ); + * * $resultset = $connection->query( - * "SELECTFROM robots WHERE type = ?", - * [ - * "mechanical", - * ] + * "SELECT FROM robots WHERE type = ?", + * [ + * "mechanical", + * ] * ); * * - * @param string $sqlStatement - * @param mixed $bindParams - * @param mixed $bindTypes - * @return bool|\Phalcon\Db\ResultInterface + * @param string $sqlStatement + * @param mixed $bindParams + * @param mixed $bindTypes + * @return bool|\Phalcon\Db\ResultInterface */ public function query($sqlStatement, $bindParams = null, $bindTypes = null) {} /** * Sends SQL statements to the database server returning the success state. * Use this method only when the SQL statement sent to the server doesn't return any rows + * * * // Inserting data * $success = $connection->execute( - * "INSERT INTO robots VALUES (1, 'Astro Boy')" + * "INSERT INTO robots VALUES (1, 'Astro Boy')" * ); + * * $success = $connection->execute( - * "INSERT INTO robots VALUES (?, ?)", - * [ - * 1, - * "Astro Boy", - * ] + * "INSERT INTO robots VALUES (?, ?)", + * [ + * 1, + * "Astro Boy", + * ] * ); * * - * @param string $sqlStatement - * @param mixed $bindParams - * @param mixed $bindTypes - * @return bool + * @param string $sqlStatement + * @param mixed $bindParams + * @param mixed $bindTypes + * @return bool */ public function execute($sqlStatement, $bindParams = null, $bindTypes = null) {} /** * Returns the number of affected rows by the latest INSERT/UPDATE/DELETE executed in the database system + * * * $connection->execute( - * "DELETE FROM robots" + * "DELETE FROM robots" * ); + * * echo $connection->affectedRows(), " were deleted"; * * - * @return int + * @return int */ public function affectedRows() {} @@ -175,120 +197,128 @@ public function affectedRows() {} * Closes the active connection returning success. Phalcon automatically closes and destroys * active connections when the request ends * - * @return bool + * @return bool */ public function close() {} /** * Escapes a value to avoid SQL injections according to the active charset in the connection + * * * $escapedStr = $connection->escapeString("some dangerous value"); * * - * @param string $str - * @return string + * @param string $str + * @return string */ public function escapeString($str) {} /** * Converts bound parameters such as :name: or ?1 into PDO bind params ? + * * * print_r( - * $connection->convertBoundParams( - * "SELECTFROM robots WHERE name = :name:", - * [ - * "Bender", - * ] - * ) + * $connection->convertBoundParams( + * "SELECT FROM robots WHERE name = :name:", + * [ + * "Bender", + * ] + * ) * ); * * - * @param string $sql - * @param array $params - * @return array + * @param string $sql + * @param array $params + * @return array */ public function convertBoundParams($sql, array $params = array()) {} /** * Returns the insert id for the auto_increment/serial column inserted in the latest executed SQL statement + * * * // Inserting a new robot * $success = $connection->insert( - * "robots", - * [ - * "Astro Boy", - * 1952, - * ], - * [ - * "name", - * "year", - * ] + * "robots", + * [ + * "Astro Boy", + * 1952, + * ], + * [ + * "name", + * "year", + * ] * ); + * * // Getting the generated id * $id = $connection->lastInsertId(); * * - * @param string $sequenceName - * @return int|boolean + * + * @param string $sequenceName + * @return int|bool */ public function lastInsertId($sequenceName = null) {} /** * Starts a transaction in the connection * - * @param bool $nesting - * @return bool + * @param bool $nesting + * @return bool */ public function begin($nesting = true) {} /** * Rollbacks the active transaction in the connection * - * @param bool $nesting - * @return bool + * @param bool $nesting + * @return bool */ public function rollback($nesting = true) {} /** * Commits the active transaction in the connection * - * @param bool $nesting - * @return bool + * @param bool $nesting + * @return bool */ public function commit($nesting = true) {} /** * Returns the current transaction nesting level * - * @return int + * @return int */ public function getTransactionLevel() {} /** * Checks whether the connection is under a transaction + * * * $connection->begin(); + * * // true * var_dump( - * $connection->isUnderTransaction() + * $connection->isUnderTransaction() * ); * * - * @return bool + * @return bool */ public function isUnderTransaction() {} /** * Return internal PDO handler * - * @return \Pdo + * @return \Pdo */ public function getInternalHandler() {} /** * Return the error info, if any * - * @return array + * + * @return array */ public function getErrorInfo() {} diff --git a/ide/stubs/Phalcon/db/adapter/pdo/Mysql.php b/ide/stubs/Phalcon/db/adapter/pdo/Mysql.php index 444df8126..b790a5daf 100644 --- a/ide/stubs/Phalcon/db/adapter/pdo/Mysql.php +++ b/ide/stubs/Phalcon/db/adapter/pdo/Mysql.php @@ -4,16 +4,20 @@ /** * Phalcon\Db\Adapter\Pdo\Mysql + * * Specific functions for the Mysql database system + * * * use Phalcon\Db\Adapter\Pdo\Mysql; + * * $config = [ - * "host" => "localhost", - * "dbname" => "blog", - * "port" => 3306, - * "username" => "sigma", - * "password" => "secret", + * "host" => "localhost", + * "dbname" => "blog", + * "port" => 3306, + * "username" => "sigma", + * "password" => "secret", * ]; + * * $connection = new Mysql($config); * */ @@ -28,43 +32,47 @@ class Mysql extends \Phalcon\Db\Adapter\Pdo /** * Returns an array of Phalcon\Db\Column objects describing a table + * * * print_r( - * $connection->describeColumns("posts") + * $connection->describeColumns("posts") * ); * * - * @param string $table - * @param string $schema - * @return Column[] + * @param string $table + * @param string $schema + * @return \Phalcon\Db\Column[] */ public function describeColumns($table, $schema = null) {} /** * Lists table indexes + * * * print_r( - * $connection->describeIndexes("robots_parts") + * $connection->describeIndexes("robots_parts") * ); * * - * @param string $table - * @param string $schema - * @return \Phalcon\Db\IndexInterface[] + * + * @param string $table + * @param string $schema + * @return \Phalcon\Db\IndexInterface[] */ public function describeIndexes($table, $schema = null) {} /** * Lists table references + * * * print_r( - * $connection->describeReferences("robots_parts") + * $connection->describeReferences("robots_parts") * ); * * - * @param string $table - * @param string $schema - * @return Reference[] + * @param string $table + * @param string $schema + * @return \Phalcon\Db\Reference[] */ public function describeReferences($table, $schema = null) {} diff --git a/ide/stubs/Phalcon/db/adapter/pdo/Postgresql.php b/ide/stubs/Phalcon/db/adapter/pdo/Postgresql.php index 41a1e9f0f..2ed8947e3 100644 --- a/ide/stubs/Phalcon/db/adapter/pdo/Postgresql.php +++ b/ide/stubs/Phalcon/db/adapter/pdo/Postgresql.php @@ -4,16 +4,20 @@ /** * Phalcon\Db\Adapter\Pdo\Postgresql + * * Specific functions for the Postgresql database system + * * * use Phalcon\Db\Adapter\Pdo\Postgresql; + * * $config = [ - * "host" => "localhost", - * "dbname" => "blog", - * "port" => 5432, - * "username" => "postgres", - * "password" => "secret", + * "host" => "localhost", + * "dbname" => "blog", + * "port" => 5432, + * "username" => "postgres", + * "password" => "secret", * ]; + * * $connection = new Postgresql($config); * */ @@ -30,80 +34,82 @@ class Postgresql extends \Phalcon\Db\Adapter\Pdo * This method is automatically called in Phalcon\Db\Adapter\Pdo constructor. * Call it when you need to restore a database connection. * - * @param array $descriptor - * @return bool + * @param array $descriptor + * @return bool */ public function connect(array $descriptor = null) {} /** * Returns an array of Phalcon\Db\Column objects describing a table + * * * print_r( - * $connection->describeColumns("posts") + * $connection->describeColumns("posts") * ); * * - * @param string $table - * @param string $schema - * @return Column[] + * @param string $table + * @param string $schema + * @return \Phalcon\Db\Column[] */ public function describeColumns($table, $schema = null) {} /** * Creates a table * - * @param string $tableName - * @param string $schemaName - * @param array $definition - * @return bool + * @param string $tableName + * @param string $schemaName + * @param array $definition + * @return bool */ public function createTable($tableName, $schemaName, array $definition) {} /** * Modifies a table column based on a definition * - * @param string $tableName - * @param string $schemaName - * @param mixed $column - * @param mixed $currentColumn - * @return bool + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\ColumnInterface $column + * @param \Phalcon\Db\ColumnInterface $currentColumn + * @return bool */ public function modifyColumn($tableName, $schemaName, \Phalcon\Db\ColumnInterface $column, \Phalcon\Db\ColumnInterface $currentColumn = null) {} /** * Check whether the database system requires an explicit value for identity columns * - * @return bool + * @return bool */ public function useExplicitIdValue() {} /** * Returns the default identity value to be inserted in an identity column + * * * // Inserting a new robot with a valid default value for the column 'id' * $success = $connection->insert( - * "robots", - * [ - * $connection->getDefaultIdValue(), - * "Astro Boy", - * 1952, - * ], - * [ - * "id", - * "name", - * "year", - * ] + * "robots", + * [ + * $connection->getDefaultIdValue(), + * "Astro Boy", + * 1952, + * ], + * [ + * "id", + * "name", + * "year", + * ] * ); * * - * @return \Phalcon\Db\RawValue + * @return \Phalcon\Db\RawValue */ public function getDefaultIdValue() {} /** * Check whether the database system requires a sequence to produce auto-numeric values * - * @return bool + * @return bool */ public function supportSequences() {} diff --git a/ide/stubs/Phalcon/db/adapter/pdo/Sqlite.php b/ide/stubs/Phalcon/db/adapter/pdo/Sqlite.php index 5e548bd70..ce5dbafef 100644 --- a/ide/stubs/Phalcon/db/adapter/pdo/Sqlite.php +++ b/ide/stubs/Phalcon/db/adapter/pdo/Sqlite.php @@ -4,13 +4,16 @@ /** * Phalcon\Db\Adapter\Pdo\Sqlite + * * Specific functions for the Sqlite database system + * * * use Phalcon\Db\Adapter\Pdo\Sqlite; + * * $connection = new Sqlite( - * [ - * "dbname" => "/tmp/test.sqlite", - * ] + * [ + * "dbname" => "/tmp/test.sqlite", + * ] * ); * */ @@ -27,76 +30,81 @@ class Sqlite extends \Phalcon\Db\Adapter\Pdo * This method is automatically called in Phalcon\Db\Adapter\Pdo constructor. * Call it when you need to restore a database connection. * - * @param array $descriptor - * @return bool + * @param array $descriptor + * @return bool */ public function connect(array $descriptor = null) {} /** * Returns an array of Phalcon\Db\Column objects describing a table + * * * print_r( - * $connection->describeColumns("posts") + * $connection->describeColumns("posts") * ); * * - * @param string $table - * @param string $schema - * @return Column[] + * @param string $table + * @param string $schema + * @return \Phalcon\Db\Column[] */ public function describeColumns($table, $schema = null) {} /** * Lists table indexes + * * * print_r( - * $connection->describeIndexes("robots_parts") + * $connection->describeIndexes("robots_parts") * ); * * - * @param string $table - * @param string $schema - * @return \Phalcon\Db\IndexInterface[] + * + * @param string $table + * @param string $schema + * @return \Phalcon\Db\IndexInterface[] */ public function describeIndexes($table, $schema = null) {} /** * Lists table references * + * * @param string table * @param string schema * @return Phalcon\Db\ReferenceInterface[] - * @param mixed $table - * @param mixed $schema - * @return ReferenceInterface[] + * @param mixed $table + * @param mixed $schema + * @return \Phalcon\Db\ReferenceInterface[] */ public function describeReferences($table, $schema = null) {} /** * Check whether the database system requires an explicit value for identity columns * - * @return bool + * @return bool */ public function useExplicitIdValue() {} /** * Returns the default value to make the RBDM use the default value declared in the table definition + * * * // Inserting a new robot with a valid default value for the column 'year' * $success = $connection->insert( - * "robots", - * [ - * "Astro Boy", - * $connection->getDefaultValue(), - * ], - * [ - * "name", - * "year", - * ] + * "robots", + * [ + * "Astro Boy", + * $connection->getDefaultValue(), + * ], + * [ + * "name", + * "year", + * ] * ); * * - * @return \Phalcon\Db\RawValue + * @return \Phalcon\Db\RawValue */ public function getDefaultValue() {} diff --git a/ide/stubs/Phalcon/db/dialect/Mysql.php b/ide/stubs/Phalcon/db/dialect/Mysql.php index 3888b90e8..053d38fac 100644 --- a/ide/stubs/Phalcon/db/dialect/Mysql.php +++ b/ide/stubs/Phalcon/db/dialect/Mysql.php @@ -4,6 +4,7 @@ /** * Phalcon\Db\Dialect\Mysql + * * Generates database specific SQL for the MySQL RDBMS */ class Mysql extends \Phalcon\Db\Dialect @@ -15,230 +16,234 @@ class Mysql extends \Phalcon\Db\Dialect /** * Gets the column name in MySQL * - * @param mixed $column - * @return string + * @param \Phalcon\Db\ColumnInterface $column + * @return string */ public function getColumnDefinition(\Phalcon\Db\ColumnInterface $column) {} /** * Generates SQL to add a column to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $column - * @return string + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\ColumnInterface $column + * @return string */ public function addColumn($tableName, $schemaName, \Phalcon\Db\ColumnInterface $column) {} /** * Generates SQL to modify a column in a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $column - * @param mixed $currentColumn - * @return string + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\ColumnInterface $column + * @param \Phalcon\Db\ColumnInterface $currentColumn + * @return string */ public function modifyColumn($tableName, $schemaName, \Phalcon\Db\ColumnInterface $column, \Phalcon\Db\ColumnInterface $currentColumn = null) {} /** * Generates SQL to delete a column from a table * - * @param string $tableName - * @param string $schemaName - * @param string $columnName - * @return string + * @param string $tableName + * @param string $schemaName + * @param string $columnName + * @return string */ public function dropColumn($tableName, $schemaName, $columnName) {} /** * Generates SQL to add an index to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $index - * @return string + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\IndexInterface $index + * @return string */ public function addIndex($tableName, $schemaName, \Phalcon\Db\IndexInterface $index) {} /** * Generates SQL to delete an index from a table * - * @param string $tableName - * @param string $schemaName - * @param string $indexName - * @return string + * @param string $tableName + * @param string $schemaName + * @param string $indexName + * @return string */ public function dropIndex($tableName, $schemaName, $indexName) {} /** * Generates SQL to add the primary key to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $index - * @return string + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\IndexInterface $index + * @return string */ public function addPrimaryKey($tableName, $schemaName, \Phalcon\Db\IndexInterface $index) {} /** * Generates SQL to delete primary key from a table * - * @param string $tableName - * @param string $schemaName - * @return string + * @param string $tableName + * @param string $schemaName + * @return string */ public function dropPrimaryKey($tableName, $schemaName) {} /** * Generates SQL to add an index to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $reference - * @return string + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\ReferenceInterface $reference + * @return string */ public function addForeignKey($tableName, $schemaName, \Phalcon\Db\ReferenceInterface $reference) {} /** * Generates SQL to delete a foreign key from a table * - * @param string $tableName - * @param string $schemaName - * @param string $referenceName - * @return string + * @param string $tableName + * @param string $schemaName + * @param string $referenceName + * @return string */ public function dropForeignKey($tableName, $schemaName, $referenceName) {} /** * Generates SQL to create a table * - * @param string $tableName - * @param string $schemaName - * @param array $definition - * @return string + * @param string $tableName + * @param string $schemaName + * @param array $definition + * @return string */ public function createTable($tableName, $schemaName, array $definition) {} /** * Generates SQL to drop a table * - * @param string $tableName - * @param string $schemaName - * @param bool $ifExists - * @return string + * @param string $tableName + * @param string $schemaName + * @param bool $ifExists + * @return string */ public function dropTable($tableName, $schemaName = null, $ifExists = true) {} /** * Generates SQL to create a view * - * @param string $viewName - * @param array $definition - * @param string $schemaName - * @return string + * @param string $viewName + * @param array $definition + * @param string $schemaName + * @return string */ public function createView($viewName, array $definition, $schemaName = null) {} /** * Generates SQL to drop a view * - * @param string $viewName - * @param string $schemaName - * @param bool $ifExists - * @return string + * @param string $viewName + * @param string $schemaName + * @param bool $ifExists + * @return string */ public function dropView($viewName, $schemaName = null, $ifExists = true) {} /** * Generates SQL checking for the existence of a schema.table + * * * echo $dialect->tableExists("posts", "blog"); + * * echo $dialect->tableExists("posts"); * * - * @param string $tableName - * @param string $schemaName - * @return string + * @param string $tableName + * @param string $schemaName + * @return string */ public function tableExists($tableName, $schemaName = null) {} /** * Generates SQL checking for the existence of a schema.view * - * @param string $viewName - * @param string $schemaName - * @return string + * @param string $viewName + * @param string $schemaName + * @return string */ public function viewExists($viewName, $schemaName = null) {} /** * Generates SQL describing a table + * * * print_r( - * $dialect->describeColumns("posts") + * $dialect->describeColumns("posts") * ); * * - * @param string $table - * @param string $schema - * @return string + * @param string $table + * @param string $schema + * @return string */ public function describeColumns($table, $schema = null) {} /** * List all tables in database + * * * print_r( - * $dialect->listTables("blog") + * $dialect->listTables("blog") * ); * * - * @param string $schemaName - * @return string + * @param string $schemaName + * @return string */ public function listTables($schemaName = null) {} /** * Generates the SQL to list all views of a schema or user * - * @param string $schemaName - * @return string + * @param string $schemaName + * @return string */ public function listViews($schemaName = null) {} /** * Generates SQL to query indexes on a table * - * @param string $table - * @param string $schema - * @return string + * @param string $table + * @param string $schema + * @return string */ public function describeIndexes($table, $schema = null) {} /** * Generates SQL to query foreign keys on a table * - * @param string $table - * @param string $schema - * @return string + * @param string $table + * @param string $schema + * @return string */ public function describeReferences($table, $schema = null) {} /** * Generates the SQL to describe the table creation options * - * @param string $table - * @param string $schema - * @return string + * @param string $table + * @param string $schema + * @return string */ public function tableOptions($table, $schema = null) {} /** * Generates SQL to add the table creation options * - * @param array $definition - * @return string + * @param array $definition + * @return string */ protected function _getTableOptions(array $definition) {} diff --git a/ide/stubs/Phalcon/db/dialect/Postgresql.php b/ide/stubs/Phalcon/db/dialect/Postgresql.php index 62116d846..0feb9c598 100644 --- a/ide/stubs/Phalcon/db/dialect/Postgresql.php +++ b/ide/stubs/Phalcon/db/dialect/Postgresql.php @@ -4,6 +4,7 @@ /** * Phalcon\Db\Dialect\Postgresql + * * Generates database specific SQL for the PostgreSQL RDBMS */ class Postgresql extends \Phalcon\Db\Dialect @@ -15,234 +16,239 @@ class Postgresql extends \Phalcon\Db\Dialect /** * Gets the column name in PostgreSQL * - * @param mixed $column - * @return string + * @param \Phalcon\Db\ColumnInterface $column + * @return string */ public function getColumnDefinition(\Phalcon\Db\ColumnInterface $column) {} /** * Generates SQL to add a column to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $column - * @return string + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\ColumnInterface $column + * @return string */ public function addColumn($tableName, $schemaName, \Phalcon\Db\ColumnInterface $column) {} /** * Generates SQL to modify a column in a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $column - * @param mixed $currentColumn - * @return string + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\ColumnInterface $column + * @param \Phalcon\Db\ColumnInterface $currentColumn + * @return string */ public function modifyColumn($tableName, $schemaName, \Phalcon\Db\ColumnInterface $column, \Phalcon\Db\ColumnInterface $currentColumn = null) {} /** * Generates SQL to delete a column from a table * - * @param string $tableName - * @param string $schemaName - * @param string $columnName - * @return string + * @param string $tableName + * @param string $schemaName + * @param string $columnName + * @return string */ public function dropColumn($tableName, $schemaName, $columnName) {} /** * Generates SQL to add an index to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $index - * @return string + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\IndexInterface $index + * @return string */ public function addIndex($tableName, $schemaName, \Phalcon\Db\IndexInterface $index) {} /** * Generates SQL to delete an index from a table * - * @param string $tableName - * @param string $schemaName - * @param string $indexName - * @return string + * @param string $tableName + * @param string $schemaName + * @param string $indexName + * @return string */ public function dropIndex($tableName, $schemaName, $indexName) {} /** * Generates SQL to add the primary key to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $index - * @return string + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\IndexInterface $index + * @return string */ public function addPrimaryKey($tableName, $schemaName, \Phalcon\Db\IndexInterface $index) {} /** * Generates SQL to delete primary key from a table * - * @param string $tableName - * @param string $schemaName - * @return string + * @param string $tableName + * @param string $schemaName + * @return string */ public function dropPrimaryKey($tableName, $schemaName) {} /** * Generates SQL to add an index to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $reference - * @return string + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\ReferenceInterface $reference + * @return string */ public function addForeignKey($tableName, $schemaName, \Phalcon\Db\ReferenceInterface $reference) {} /** * Generates SQL to delete a foreign key from a table * - * @param string $tableName - * @param string $schemaName - * @param string $referenceName - * @return string + * @param string $tableName + * @param string $schemaName + * @param string $referenceName + * @return string */ public function dropForeignKey($tableName, $schemaName, $referenceName) {} /** * Generates SQL to create a table * - * @param string $tableName - * @param string $schemaName - * @param array $definition - * @return string|array + * @param string $tableName + * @param string $schemaName + * @param array $definition + * @return string|array */ public function createTable($tableName, $schemaName, array $definition) {} /** * Generates SQL to drop a table * - * @param string $tableName - * @param string $schemaName - * @param bool $ifExists - * @return string + * @param string $tableName + * @param string $schemaName + * @param bool $ifExists + * @return string */ public function dropTable($tableName, $schemaName = null, $ifExists = true) {} /** * Generates SQL to create a view * - * @param string $viewName - * @param array $definition - * @param string $schemaName - * @return string + * @param string $viewName + * @param array $definition + * @param string $schemaName + * @return string */ public function createView($viewName, array $definition, $schemaName = null) {} /** * Generates SQL to drop a view * - * @param string $viewName - * @param string $schemaName - * @param bool $ifExists - * @return string + * @param string $viewName + * @param string $schemaName + * @param bool $ifExists + * @return string */ public function dropView($viewName, $schemaName = null, $ifExists = true) {} /** * Generates SQL checking for the existence of a schema.table + * * * echo $dialect->tableExists("posts", "blog"); + * * echo $dialect->tableExists("posts"); * * - * @param string $tableName - * @param string $schemaName - * @return string + * @param string $tableName + * @param string $schemaName + * @return string */ public function tableExists($tableName, $schemaName = null) {} /** * Generates SQL checking for the existence of a schema.view * - * @param string $viewName - * @param string $schemaName - * @return string + * @param string $viewName + * @param string $schemaName + * @return string */ public function viewExists($viewName, $schemaName = null) {} /** * Generates SQL describing a table + * * * print_r( - * $dialect->describeColumns("posts") + * $dialect->describeColumns("posts") * ); * * - * @param string $table - * @param string $schema - * @return string + * @param string $table + * @param string $schema + * @return string */ public function describeColumns($table, $schema = null) {} /** * List all tables in database + * * * print_r( - * $dialect->listTables("blog") + * $dialect->listTables("blog") * ); * * - * @param string $schemaName - * @return string + * @param string $schemaName + * @return string */ public function listTables($schemaName = null) {} /** * Generates the SQL to list all views of a schema or user * - * @param string $schemaName - * @return string + * + * @param string $schemaName + * @return string */ public function listViews($schemaName = null) {} /** * Generates SQL to query indexes on a table * - * @param string $table - * @param string $schema - * @return string + * @param string $table + * @param string $schema + * @return string */ public function describeIndexes($table, $schema = null) {} /** * Generates SQL to query foreign keys on a table * - * @param string $table - * @param string $schema - * @return string + * @param string $table + * @param string $schema + * @return string */ public function describeReferences($table, $schema = null) {} /** * Generates the SQL to describe the table creation options * - * @param string $table - * @param string $schema - * @return string + * @param string $table + * @param string $schema + * @return string */ public function tableOptions($table, $schema = null) {} /** - * @param mixed $column - * @return string + * @param \Phalcon\Db\ColumnInterface $column + * @return string */ protected function _castDefault(\Phalcon\Db\ColumnInterface $column) {} /** - * @param array $definition - * @return string + * @param array $definition + * @return string */ protected function _getTableOptions(array $definition) {} diff --git a/ide/stubs/Phalcon/db/dialect/Sqlite.php b/ide/stubs/Phalcon/db/dialect/Sqlite.php index 8eea783e1..d56a258e0 100644 --- a/ide/stubs/Phalcon/db/dialect/Sqlite.php +++ b/ide/stubs/Phalcon/db/dialect/Sqlite.php @@ -4,6 +4,7 @@ /** * Phalcon\Db\Dialect\Sqlite + * * Generates database specific SQL for the Sqlite RDBMS */ class Sqlite extends \Phalcon\Db\Dialect @@ -15,245 +16,250 @@ class Sqlite extends \Phalcon\Db\Dialect /** * Gets the column name in SQLite * - * @param mixed $column - * @return string + * @param \Phalcon\Db\ColumnInterface $column + * @return string */ public function getColumnDefinition(\Phalcon\Db\ColumnInterface $column) {} /** * Generates SQL to add a column to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $column - * @return string + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\ColumnInterface $column + * @return string */ public function addColumn($tableName, $schemaName, \Phalcon\Db\ColumnInterface $column) {} /** * Generates SQL to modify a column in a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $column - * @param mixed $currentColumn - * @return string + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\ColumnInterface $column + * @param \Phalcon\Db\ColumnInterface $currentColumn + * @return string */ public function modifyColumn($tableName, $schemaName, \Phalcon\Db\ColumnInterface $column, \Phalcon\Db\ColumnInterface $currentColumn = null) {} /** * Generates SQL to delete a column from a table * - * @param string $tableName - * @param string $schemaName - * @param string $columnName - * @return string + * @param string $tableName + * @param string $schemaName + * @param string $columnName + * @return string */ public function dropColumn($tableName, $schemaName, $columnName) {} /** * Generates SQL to add an index to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $index - * @return string + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\IndexInterface $index + * @return string */ public function addIndex($tableName, $schemaName, \Phalcon\Db\IndexInterface $index) {} /** * Generates SQL to delete an index from a table * - * @param string $tableName - * @param string $schemaName - * @param string $indexName - * @return string + * @param string $tableName + * @param string $schemaName + * @param string $indexName + * @return string */ public function dropIndex($tableName, $schemaName, $indexName) {} /** * Generates SQL to add the primary key to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $index - * @return string + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\IndexInterface $index + * @return string */ public function addPrimaryKey($tableName, $schemaName, \Phalcon\Db\IndexInterface $index) {} /** * Generates SQL to delete primary key from a table * - * @param string $tableName - * @param string $schemaName - * @return string + * @param string $tableName + * @param string $schemaName + * @return string */ public function dropPrimaryKey($tableName, $schemaName) {} /** * Generates SQL to add an index to a table * - * @param string $tableName - * @param string $schemaName - * @param mixed $reference - * @return string + * @param string $tableName + * @param string $schemaName + * @param \Phalcon\Db\ReferenceInterface $reference + * @return string */ public function addForeignKey($tableName, $schemaName, \Phalcon\Db\ReferenceInterface $reference) {} /** * Generates SQL to delete a foreign key from a table * - * @param string $tableName - * @param string $schemaName - * @param string $referenceName - * @return string + * @param string $tableName + * @param string $schemaName + * @param string $referenceName + * @return string */ public function dropForeignKey($tableName, $schemaName, $referenceName) {} /** * Generates SQL to create a table * - * @param string $tableName - * @param string $schemaName - * @param array $definition - * @return string + * @param string $tableName + * @param string $schemaName + * @param array $definition + * @return string */ public function createTable($tableName, $schemaName, array $definition) {} /** * Generates SQL to drop a table * - * @param string $tableName - * @param string $schemaName - * @param bool $ifExists - * @return string + * @param string $tableName + * @param string $schemaName + * @param bool $ifExists + * @return string */ public function dropTable($tableName, $schemaName = null, $ifExists = true) {} /** * Generates SQL to create a view * - * @param string $viewName - * @param array $definition - * @param string $schemaName - * @return string + * @param string $viewName + * @param array $definition + * @param string $schemaName + * @return string */ public function createView($viewName, array $definition, $schemaName = null) {} /** * Generates SQL to drop a view * - * @param string $viewName - * @param string $schemaName - * @param bool $ifExists - * @return string + * @param string $viewName + * @param string $schemaName + * @param bool $ifExists + * @return string */ public function dropView($viewName, $schemaName = null, $ifExists = true) {} /** * Generates SQL checking for the existence of a schema.table + * * * echo $dialect->tableExists("posts", "blog"); + * * echo $dialect->tableExists("posts"); * * - * @param string $tableName - * @param string $schemaName - * @return string + * @param string $tableName + * @param string $schemaName + * @return string */ public function tableExists($tableName, $schemaName = null) {} /** * Generates SQL checking for the existence of a schema.view * - * @param string $viewName - * @param string $schemaName - * @return string + * @param string $viewName + * @param string $schemaName + * @return string */ public function viewExists($viewName, $schemaName = null) {} /** * Generates SQL describing a table + * * * print_r( - * $dialect->describeColumns("posts") + * $dialect->describeColumns("posts") * ); * * - * @param string $table - * @param string $schema - * @return string + * @param string $table + * @param string $schema + * @return string */ public function describeColumns($table, $schema = null) {} /** * List all tables in database + * * * print_r( - * $dialect->listTables("blog") + * $dialect->listTables("blog") * ); * * - * @param string $schemaName - * @return string + * @param string $schemaName + * @return string */ public function listTables($schemaName = null) {} /** * Generates the SQL to list all views of a schema or user * - * @param string $schemaName - * @return string + * @param string $schemaName + * @return string */ public function listViews($schemaName = null) {} /** * Generates the SQL to get query list of indexes + * * * print_r( - * $dialect->listIndexesSql("blog") + * $dialect->listIndexesSql("blog") * ); * * - * @param string $table - * @param string $schema - * @param string $keyName - * @return string + * @param string $table + * @param string $schema + * @param string $keyName + * @return string */ public function listIndexesSql($table, $schema = null, $keyName = null) {} /** * Generates SQL to query indexes on a table * - * @param string $table - * @param string $schema - * @return string + * @param string $table + * @param string $schema + * @return string */ public function describeIndexes($table, $schema = null) {} /** * Generates SQL to query indexes detail on a table * - * @param string $index - * @return string + * @param string $index + * @return string */ public function describeIndex($index) {} /** * Generates SQL to query foreign keys on a table * - * @param string $table - * @param string $schema - * @return string + * @param string $table + * @param string $schema + * @return string */ public function describeReferences($table, $schema = null) {} /** * Generates the SQL to describe the table creation options * - * @param string $table - * @param string $schema - * @return string + * @param string $table + * @param string $schema + * @return string */ public function tableOptions($table, $schema = null) {} diff --git a/ide/stubs/Phalcon/db/profiler/Item.php b/ide/stubs/Phalcon/db/profiler/Item.php index 6899dfad0..d17c04f56 100644 --- a/ide/stubs/Phalcon/db/profiler/Item.php +++ b/ide/stubs/Phalcon/db/profiler/Item.php @@ -4,13 +4,16 @@ /** * Phalcon\Db\Profiler\Item + * * This class identifies each profile in a Phalcon\Db\Profiler + * */ class Item { /** * SQL statement related to the profile * + * * @var string */ protected $_sqlStatement; @@ -18,6 +21,7 @@ class Item /** * SQL variables related to the profile * + * * @var array */ protected $_sqlVariables; @@ -25,6 +29,7 @@ class Item /** * SQL bind types related to the profile * + * * @var array */ protected $_sqlBindTypes; @@ -32,6 +37,7 @@ class Item /** * Timestamp when the profile started * + * * @var double */ protected $_initialTime; @@ -39,6 +45,7 @@ class Item /** * Timestamp when the profile ended * + * * @var double */ protected $_finalTime; @@ -47,77 +54,77 @@ class Item /** * SQL statement related to the profile * - * @param string $sqlStatement + * @param string $sqlStatement */ public function setSqlStatement($sqlStatement) {} /** * SQL statement related to the profile * - * @return string + * @return string */ public function getSqlStatement() {} /** * SQL variables related to the profile * - * @param array $sqlVariables + * @param array $sqlVariables */ public function setSqlVariables(array $sqlVariables) {} /** * SQL variables related to the profile * - * @return array + * @return array */ public function getSqlVariables() {} /** * SQL bind types related to the profile * - * @param array $sqlBindTypes + * @param array $sqlBindTypes */ public function setSqlBindTypes(array $sqlBindTypes) {} /** * SQL bind types related to the profile * - * @return array + * @return array */ public function getSqlBindTypes() {} /** * Timestamp when the profile started * - * @param double $initialTime + * @param double $initialTime */ public function setInitialTime($initialTime) {} /** * Timestamp when the profile started * - * @return double + * @return double */ public function getInitialTime() {} /** * Timestamp when the profile ended * - * @param double $finalTime + * @param double $finalTime */ public function setFinalTime($finalTime) {} /** * Timestamp when the profile ended * - * @return double + * @return double */ public function getFinalTime() {} /** * Returns the total time in seconds spent by the profile * - * @return double + * @return double */ public function getTotalElapsedSeconds() {} diff --git a/ide/stubs/Phalcon/db/result/Pdo.php b/ide/stubs/Phalcon/db/result/Pdo.php index bb96205bb..dded6a53d 100644 --- a/ide/stubs/Phalcon/db/result/Pdo.php +++ b/ide/stubs/Phalcon/db/result/Pdo.php @@ -4,14 +4,18 @@ /** * Phalcon\Db\Result\Pdo + * * Encapsulates the resultset internals + * * - * $result = $connection->query("SELECTFROM robots ORDER BY name"); + * $result = $connection->query("SELECT FROM robots ORDER BY name"); + * * $result->setFetchMode( - * \Phalcon\Db::FETCH_NUM + * \Phalcon\Db::FETCH_NUM * ); + * * while ($robot = $result->fetchArray()) { - * print_r($robot); + * print_r($robot); * } * */ @@ -31,6 +35,7 @@ class Pdo implements \Phalcon\Db\ResultInterface /** * Internal resultset * + * * @var \PDOStatement */ protected $_pdoStatement; @@ -51,11 +56,12 @@ class Pdo implements \Phalcon\Db\ResultInterface /** * Phalcon\Db\Result\Pdo constructor * - * @param \Phalcon\Db\AdapterInterface $connection - * @param \PDOStatement $result - * @param string $sqlStatement - * @param array $bindParams - * @param array $bindTypes + * + * @param \Phalcon\Db\AdapterInterface $connection + * @param \PDOStatement $result + * @param string $sqlStatement + * @param array $bindParams + * @param array $bindTypes */ public function __construct(Db\AdapterInterface $connection, \PDOStatement $result, $sqlStatement = null, $bindParams = null, $bindTypes = null) {} @@ -63,39 +69,45 @@ public function __construct(Db\AdapterInterface $connection, \PDOStatement $resu * Allows to execute the statement again. Some database systems don't support scrollable cursors, * So, as cursors are forward only, we need to execute the cursor again to fetch rows from the begining * - * @return bool + * @return bool */ public function execute() {} /** * Fetches an array/object of strings that corresponds to the fetched row, or FALSE if there are no more rows. * This method is affected by the active fetch flag set using Phalcon\Db\Result\Pdo::setFetchMode + * * - * $result = $connection->query("SELECTFROM robots ORDER BY name"); + * $result = $connection->query("SELECT FROM robots ORDER BY name"); + * * $result->setFetchMode( - * \Phalcon\Db::FETCH_OBJ + * \Phalcon\Db::FETCH_OBJ * ); + * * while ($robot = $result->fetch()) { - * echo $robot->name; + * echo $robot->name; * } * * - * @param mixed $fetchStyle - * @param mixed $cursorOrientation - * @param mixed $cursorOffset + * @param mixed $fetchStyle + * @param mixed $cursorOrientation + * @param mixed $cursorOffset */ public function fetch($fetchStyle = null, $cursorOrientation = null, $cursorOffset = null) {} /** * Returns an array of strings that corresponds to the fetched row, or FALSE if there are no more rows. * This method is affected by the active fetch flag set using Phalcon\Db\Result\Pdo::setFetchMode + * * - * $result = $connection->query("SELECTFROM robots ORDER BY name"); + * $result = $connection->query("SELECT FROM robots ORDER BY name"); + * * $result->setFetchMode( - * \Phalcon\Db::FETCH_NUM + * \Phalcon\Db::FETCH_NUM * ); + * * while ($robot = result->fetchArray()) { - * print_r($robot); + * print_r($robot); * } * */ @@ -104,81 +116,92 @@ public function fetchArray() {} /** * Returns an array of arrays containing all the records in the result * This method is affected by the active fetch flag set using Phalcon\Db\Result\Pdo::setFetchMode + * * * $result = $connection->query( - * "SELECTFROM robots ORDER BY name" + * "SELECT FROM robots ORDER BY name" * ); + * * $robots = $result->fetchAll(); * * - * @param mixed $fetchStyle - * @param mixed $fetchArgument - * @param mixed $ctorArgs - * @return array + * @param mixed $fetchStyle + * @param mixed $fetchArgument + * @param mixed $ctorArgs + * @return array */ public function fetchAll($fetchStyle = null, $fetchArgument = null, $ctorArgs = null) {} /** * Gets number of rows returned by a resultset + * * * $result = $connection->query( - * "SELECTFROM robots ORDER BY name" + * "SELECT FROM robots ORDER BY name" * ); + * * echo "There are ", $result->numRows(), " rows in the resultset"; * * - * @return int + * @return int */ public function numRows() {} /** * Moves internal resultset cursor to another position letting us to fetch a certain row + * * * $result = $connection->query( - * "SELECTFROM robots ORDER BY name" + * "SELECT FROM robots ORDER BY name" * ); + * * // Move to third row on result * $result->dataSeek(2); + * * // Fetch third row * $row = $result->fetch(); * * - * @param long $number + * @param long $number */ public function dataSeek($number) {} /** * Changes the fetching mode affecting Phalcon\Db\Result\Pdo::fetch() + * * * // Return array with integer indexes * $result->setFetchMode( - * \Phalcon\Db::FETCH_NUM + * \Phalcon\Db::FETCH_NUM * ); + * * // Return associative array without integer indexes * $result->setFetchMode( - * \Phalcon\Db::FETCH_ASSOC + * \Phalcon\Db::FETCH_ASSOC * ); + * * // Return associative array together with integer indexes * $result->setFetchMode( - * \Phalcon\Db::FETCH_BOTH + * \Phalcon\Db::FETCH_BOTH * ); + * * // Return an object * $result->setFetchMode( - * \Phalcon\Db::FETCH_OBJ + * \Phalcon\Db::FETCH_OBJ * ); * * - * @param int $fetchMode - * @param mixed $colNoOrClassNameOrObject - * @param mixed $ctorargs - * @return bool + * @param int $fetchMode + * @param mixed $colNoOrClassNameOrObject + * @param mixed $ctorargs + * @return bool */ public function setFetchMode($fetchMode, $colNoOrClassNameOrObject = null, $ctorargs = null) {} /** * Gets the internal PDO result object * - * @return \PDOStatement + * @return \PDOStatement */ public function getInternalResult() {} diff --git a/ide/stubs/Phalcon/debug/Dump.php b/ide/stubs/Phalcon/debug/Dump.php index eb9ae122f..4a8460cc6 100644 --- a/ide/stubs/Phalcon/debug/Dump.php +++ b/ide/stubs/Phalcon/debug/Dump.php @@ -4,15 +4,20 @@ /** * Phalcon\Debug\Dump + * * Dumps information about a variable(s) + * * * $foo = 123; + * * echo (new \Phalcon\Debug\Dump())->variable($foo, "foo"); * + * * * $foo = "string"; * $bar = ["key" => "value"]; * $baz = new stdClass(); + * * echo (new \Phalcon\Debug\Dump())->variables($foo, $bar, $baz); * */ @@ -32,14 +37,15 @@ class Dump public function getDetailed() {} /** - * @param mixed $detailed + * @param mixed $detailed */ public function setDetailed($detailed) {} /** * Phalcon\Debug\Dump constructor * - * @param array $styles + * + * @param array $styles * @param boolean $detailed debug object's private and protected properties */ public function __construct(array $styles = array(), $detailed = false) {} @@ -47,89 +53,99 @@ public function __construct(array $styles = array(), $detailed = false) {} /** * Alias of variables() method * - * @param mixed $variable - * @param ... - * @return string + * + * @param mixed $variable + * @param ... + * @return string */ public function all() {} /** * Get style for type * - * @param string $type - * @return string + * @param string $type + * @return string */ protected function getStyle($type) {} /** * Set styles for vars type * - * @param array $styles - * @return array + * @param array $styles + * @return array */ public function setStyles(array $styles = array()) {} /** * Alias of variable() method * - * @param mixed $variable - * @param string $name - * @return string + * @param mixed $variable + * @param string $name + * @return string */ public function one($variable, $name = null) {} /** * Prepare an HTML string of information about a single variable. * - * @param mixed $variable - * @param string $name - * @param int $tab - * @return string + * @param mixed $variable + * @param string $name + * @param int $tab + * @return string */ protected function output($variable, $name = null, $tab = 1) {} /** * Returns an HTML string of information about a single variable. + * * * echo (new \Phalcon\Debug\Dump())->variable($foo, "foo"); * * - * @param mixed $variable - * @param string $name - * @return string + * @param mixed $variable + * @param string $name + * @return string */ public function variable($variable, $name = null) {} /** * Returns an HTML string of debugging information about any number of * variables, each wrapped in a "pre" tag. + * * * $foo = "string"; * $bar = ["key" => "value"]; * $baz = new stdClass(); + * * echo (new \Phalcon\Debug\Dump())->variables($foo, $bar, $baz); * * - * @param mixed $variable - * @param ... - * @return string + * + * @param mixed $variable + * @param ... + * @return string */ public function variables() {} /** * Returns an JSON string of information about a single variable. + * * * $foo = [ - * "key" => "value", + * "key" => "value", * ]; + * * echo (new \Phalcon\Debug\Dump())->toJson($foo); + * * $foo = new stdClass(); * $foo->bar = "buz"; + * * echo (new \Phalcon\Debug\Dump())->toJson($foo); * * - * @param mixed $variable - * @return string + * + * @param mixed $variable + * @return string */ public function toJson($variable) {} diff --git a/ide/stubs/Phalcon/debug/Exception.php b/ide/stubs/Phalcon/debug/Exception.php index 12c2c2b76..d98578f40 100644 --- a/ide/stubs/Phalcon/debug/Exception.php +++ b/ide/stubs/Phalcon/debug/Exception.php @@ -4,7 +4,9 @@ /** * Phalcon\Debug\Exception + * * Exceptions thrown in Phalcon\Debug will use this class + * */ class Exception extends \Phalcon\Exception { diff --git a/ide/stubs/Phalcon/di/Exception.php b/ide/stubs/Phalcon/di/Exception.php index f574eecf2..50cebbcde 100644 --- a/ide/stubs/Phalcon/di/Exception.php +++ b/ide/stubs/Phalcon/di/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Di\Exception + * * Exceptions thrown in Phalcon\Di will use this class */ class Exception extends \Phalcon\Exception diff --git a/ide/stubs/Phalcon/di/FactoryDefault.php b/ide/stubs/Phalcon/di/FactoryDefault.php index e3bbd451d..343d0b96e 100644 --- a/ide/stubs/Phalcon/di/FactoryDefault.php +++ b/ide/stubs/Phalcon/di/FactoryDefault.php @@ -4,6 +4,7 @@ /** * Phalcon\Di\FactoryDefault + * * This is a variant of the standard Phalcon\Di. By default it automatically * registers all the services provided by the framework. Thanks to this, the developer does not need * to register each service individually providing a full stack framework diff --git a/ide/stubs/Phalcon/di/Injectable.php b/ide/stubs/Phalcon/di/Injectable.php index d9aa39cdb..fb9f4792d 100644 --- a/ide/stubs/Phalcon/di/Injectable.php +++ b/ide/stubs/Phalcon/di/Injectable.php @@ -4,9 +4,11 @@ /** * Phalcon\Di\Injectable + * * This class allows to access services in the services container by just only accessing a public property * with the same name of a registered service * + * * @property \Phalcon\Mvc\Dispatcher|\Phalcon\Mvc\DispatcherInterface $dispatcher * @property \Phalcon\Mvc\Router|\Phalcon\Mvc\RouterInterface $router * @property \Phalcon\Mvc\Url|\Phalcon\Mvc\UrlInterface $url @@ -37,6 +39,7 @@ abstract class Injectable implements \Phalcon\Di\InjectionAwareInterface, \Phalc /** * Dependency Injector * + * * @var \Phalcon\DiInterface */ protected $_dependencyInjector; @@ -44,6 +47,7 @@ abstract class Injectable implements \Phalcon\Di\InjectionAwareInterface, \Phalc /** * Events Manager * + * * @var \Phalcon\Events\ManagerInterface */ protected $_eventsManager; @@ -52,35 +56,35 @@ abstract class Injectable implements \Phalcon\Di\InjectionAwareInterface, \Phalc /** * Sets the dependency injector * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the internal dependency injector * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI() {} /** * Sets the event manager * - * @param mixed $eventsManager + * @param \Phalcon\Events\ManagerInterface $eventsManager */ public function setEventsManager(\Phalcon\Events\ManagerInterface $eventsManager) {} /** * Returns the internal event manager * - * @return \Phalcon\Events\ManagerInterface + * @return \Phalcon\Events\ManagerInterface */ public function getEventsManager() {} /** * Magic method __get * - * @param string $propertyName + * @param string $propertyName */ public function __get($propertyName) {} diff --git a/ide/stubs/Phalcon/di/InjectionAwareInterface.php b/ide/stubs/Phalcon/di/InjectionAwareInterface.php index c2d6ce67d..e2bd251b3 100644 --- a/ide/stubs/Phalcon/di/InjectionAwareInterface.php +++ b/ide/stubs/Phalcon/di/InjectionAwareInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Di\InjectionAwareInterface + * * This interface must be implemented in those classes that uses internally the Phalcon\Di that creates them */ interface InjectionAwareInterface @@ -12,14 +13,14 @@ interface InjectionAwareInterface /** * Sets the dependency injector * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector); /** * Returns the internal dependency injector * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI(); diff --git a/ide/stubs/Phalcon/di/Service.php b/ide/stubs/Phalcon/di/Service.php index 5230c57ad..04a0854ef 100644 --- a/ide/stubs/Phalcon/di/Service.php +++ b/ide/stubs/Phalcon/di/Service.php @@ -4,12 +4,15 @@ /** * Phalcon\Di\Service + * * Represents individually a service in the services container + * * * $service = new \Phalcon\Di\Service( - * "request", - * "Phalcon\\Http\\Request" + * "request", + * "Phalcon\\Http\\Request" * ); + * * $request = service->resolve(); * */ @@ -34,92 +37,98 @@ class Service implements \Phalcon\Di\ServiceInterface /** * Phalcon\Di\Service * - * @param string $name - * @param mixed $definition - * @param boolean $shared + * + * @param string $name + * @param mixed $definition + * @param boolean $shared */ public final function __construct($name, $definition, $shared = false) {} /** * Returns the service's name * - * @return string + * @return string */ public function getName() {} /** * Sets if the service is shared or not * - * @param bool $shared + * @param bool $shared */ public function setShared($shared) {} /** * Check whether the service is shared or not * - * @return bool + * @return bool */ public function isShared() {} /** * Sets/Resets the shared instance related to the service * - * @param mixed $sharedInstance + * + * @param mixed $sharedInstance */ public function setSharedInstance($sharedInstance) {} /** * Set the service definition * - * @param mixed $definition + * + * @param mixed $definition */ public function setDefinition($definition) {} /** * Returns the service definition * - * @return mixed + * + * @return mixed */ public function getDefinition() {} /** * Resolves the service * - * @param array $parameters - * @param \Phalcon\DiInterface $dependencyInjector - * @return mixed + * + * @param array $parameters + * @param \Phalcon\DiInterface $dependencyInjector + * @return mixed */ public function resolve($parameters = null, \Phalcon\DiInterface $dependencyInjector = null) {} /** * Changes a parameter in the definition without resolve the service * - * @param int $position - * @param array $parameter - * @return Service + * @param int $position + * @param array $parameter + * @return Service */ public function setParameter($position, array $parameter) {} /** * Returns a parameter in a specific position * - * @param int $position - * @return array + * + * @param int $position + * @return array */ public function getParameter($position) {} /** * Returns true if the service was resolved * - * @return bool + * @return bool */ public function isResolved() {} /** * Restore the internal state of a service * - * @param array $attributes - * @return Service + * @param array $attributes + * @return Service */ public static function __set_state(array $attributes) {} diff --git a/ide/stubs/Phalcon/di/ServiceInterface.php b/ide/stubs/Phalcon/di/ServiceInterface.php index e81372740..5f029f216 100644 --- a/ide/stubs/Phalcon/di/ServiceInterface.php +++ b/ide/stubs/Phalcon/di/ServiceInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Di\ServiceInterface + * * Represents a service in the services container */ interface ServiceInterface @@ -12,61 +13,65 @@ interface ServiceInterface /** * Returns the service's name * - * @param string + * + * @param string */ public function getName(); /** * Sets if the service is shared or not * - * @param bool $shared + * @param bool $shared */ public function setShared($shared); /** * Check whether the service is shared or not * - * @return bool + * @return bool */ public function isShared(); /** * Set the service definition * - * @param mixed $definition + * + * @param mixed $definition */ public function setDefinition($definition); /** * Returns the service definition * - * @return mixed + * + * @return mixed */ public function getDefinition(); /** * Resolves the service * - * @param array $parameters - * @param \Phalcon\DiInterface $dependencyInjector - * @return mixed + * + * @param array $parameters + * @param \Phalcon\DiInterface $dependencyInjector + * @return mixed */ public function resolve($parameters = null, \Phalcon\DiInterface $dependencyInjector = null); /** * Changes a parameter in the definition without resolve the service * - * @param int $position - * @param array $parameter - * @return ServiceInterface + * @param int $position + * @param array $parameter + * @return ServiceInterface */ public function setParameter($position, array $parameter); /** * Restore the internal state of a service * - * @param array $attributes - * @return ServiceInterface + * @param array $attributes + * @return ServiceInterface */ public static function __set_state(array $attributes); diff --git a/ide/stubs/Phalcon/di/factorydefault/Cli.php b/ide/stubs/Phalcon/di/factorydefault/Cli.php index ddfc0eb2a..16bf2850f 100644 --- a/ide/stubs/Phalcon/di/factorydefault/Cli.php +++ b/ide/stubs/Phalcon/di/factorydefault/Cli.php @@ -4,6 +4,7 @@ /** * Phalcon\Di\FactoryDefault\Cli + * * This is a variant of the standard Phalcon\Di. By default it automatically * registers all the services provided by the framework. * Thanks to this, the developer does not need to register each service individually. diff --git a/ide/stubs/Phalcon/di/service/Builder.php b/ide/stubs/Phalcon/di/service/Builder.php index 07a8e273c..a5db0a3ff 100644 --- a/ide/stubs/Phalcon/di/service/Builder.php +++ b/ide/stubs/Phalcon/di/service/Builder.php @@ -4,6 +4,7 @@ /** * Phalcon\Di\Service\Builder + * * This class builds instances based on complex definitions */ class Builder @@ -12,29 +13,31 @@ class Builder /** * Resolves a constructor/call parameter * - * @param \Phalcon\DiInterface $dependencyInjector - * @param int $position - * @param array $argument - * @return mixed + * + * @param \Phalcon\DiInterface $dependencyInjector + * @param int $position + * @param array $argument + * @return mixed */ private function _buildParameter(\Phalcon\DiInterface $dependencyInjector, $position, array $argument) {} /** * Resolves an array of parameters * - * @param mixed $dependencyInjector - * @param array $arguments - * @return array + * @param \Phalcon\DiInterface $dependencyInjector + * @param array $arguments + * @return array */ private function _buildParameters(\Phalcon\DiInterface $dependencyInjector, array $arguments) {} /** * Builds a service using a complex service definition * - * @param \Phalcon\DiInterface $dependencyInjector - * @param array $definition - * @param array $parameters - * @return mixed + * + * @param \Phalcon\DiInterface $dependencyInjector + * @param array $definition + * @param array $parameters + * @return mixed */ public function build(\Phalcon\DiInterface $dependencyInjector, array $definition, $parameters = null) {} diff --git a/ide/stubs/Phalcon/escaper/Exception.php b/ide/stubs/Phalcon/escaper/Exception.php index 7f581db8a..3edb0ca2a 100644 --- a/ide/stubs/Phalcon/escaper/Exception.php +++ b/ide/stubs/Phalcon/escaper/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Escaper\Exception + * * Exceptions thrown in Phalcon\Escaper will use this class */ class Exception extends \Phalcon\Exception diff --git a/ide/stubs/Phalcon/events/Event.php b/ide/stubs/Phalcon/events/Event.php index 39f3e0d74..03d1618c8 100644 --- a/ide/stubs/Phalcon/events/Event.php +++ b/ide/stubs/Phalcon/events/Event.php @@ -4,6 +4,7 @@ /** * Phalcon\Events\Event + * * This class offers contextual information of a fired event in the EventsManager */ class Event implements \Phalcon\Events\EventInterface @@ -11,6 +12,7 @@ class Event implements \Phalcon\Events\EventInterface /** * Event type * + * * @var string */ protected $_type; @@ -18,6 +20,7 @@ class Event implements \Phalcon\Events\EventInterface /** * Event source * + * * @var object */ protected $_source; @@ -25,6 +28,7 @@ class Event implements \Phalcon\Events\EventInterface /** * Event data * + * * @var mixed */ protected $_data; @@ -32,6 +36,7 @@ class Event implements \Phalcon\Events\EventInterface /** * Is event propagation stopped? * + * * @var boolean */ protected $_stopped = false; @@ -39,6 +44,7 @@ class Event implements \Phalcon\Events\EventInterface /** * Is event cancelable? * + * * @var boolean */ protected $_cancelable = true; @@ -47,78 +53,81 @@ class Event implements \Phalcon\Events\EventInterface /** * Event type * - * @return string + * @return string */ public function getType() {} /** * Event source * - * @return object + * @return object */ public function getSource() {} /** * Event data * - * @return mixed + * @return mixed */ public function getData() {} /** * Phalcon\Events\Event constructor * - * @param string $type - * @param object $source - * @param mixed $data - * @param boolean $cancelable + * + * @param string $type + * @param object $source + * @param mixed $data + * @param boolean $cancelable */ public function __construct($type, $source, $data = null, $cancelable = true) {} /** * Sets event data. * - * @param mixed $data - * @return EventInterface + * @param mixed $data + * @return EventInterface */ public function setData($data = null) {} /** * Sets event type. * - * @param string $type - * @return EventInterface + * @param string $type + * @return EventInterface */ public function setType($type) {} /** * Stops the event preventing propagation. + * * * if ($event->isCancelable()) { - * $event->stop(); + * $event->stop(); * } * * - * @return EventInterface + * @return EventInterface */ public function stop() {} /** * Check whether the event is currently stopped. * - * @return bool + * @return bool */ public function isStopped() {} /** * Check whether the event is cancelable. + * * * if ($event->isCancelable()) { - * $event->stop(); + * $event->stop(); * } * * - * @return bool + * @return bool */ public function isCancelable() {} diff --git a/ide/stubs/Phalcon/events/EventInterface.php b/ide/stubs/Phalcon/events/EventInterface.php index 72c8e67f6..de3427cc4 100644 --- a/ide/stubs/Phalcon/events/EventInterface.php +++ b/ide/stubs/Phalcon/events/EventInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Events\EventInterface + * * Interface for Phalcon\Events\Event class */ interface EventInterface @@ -12,51 +13,51 @@ interface EventInterface /** * Gets event data * - * @return mixed + * @return mixed */ public function getData(); /** * Sets event data * - * @param mixed $data - * @return EventInterface + * @param mixed $data + * @return EventInterface */ public function setData($data = null); /** * Gets event type * - * @return mixed + * @return mixed */ public function getType(); /** * Sets event type * - * @param string $type - * @return EventInterface + * @param string $type + * @return EventInterface */ public function setType($type); /** * Stops the event preventing propagation * - * @return EventInterface + * @return EventInterface */ public function stop(); /** * Check whether the event is currently stopped * - * @return bool + * @return bool */ public function isStopped(); /** * Check whether the event is cancelable * - * @return bool + * @return bool */ public function isCancelable(); diff --git a/ide/stubs/Phalcon/events/EventsAwareInterface.php b/ide/stubs/Phalcon/events/EventsAwareInterface.php index 6be053686..903a9bb85 100644 --- a/ide/stubs/Phalcon/events/EventsAwareInterface.php +++ b/ide/stubs/Phalcon/events/EventsAwareInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Events\EventsAwareInterface + * * This interface must for those classes that accept an EventsManager and dispatch events */ interface EventsAwareInterface @@ -12,14 +13,14 @@ interface EventsAwareInterface /** * Sets the events manager * - * @param mixed $eventsManager + * @param ManagerInterface $eventsManager */ public function setEventsManager(ManagerInterface $eventsManager); /** * Returns the internal event manager * - * @return ManagerInterface + * @return ManagerInterface */ public function getEventsManager(); diff --git a/ide/stubs/Phalcon/events/Exception.php b/ide/stubs/Phalcon/events/Exception.php index 3e6aec93b..fc0f82069 100644 --- a/ide/stubs/Phalcon/events/Exception.php +++ b/ide/stubs/Phalcon/events/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Events\Exception + * * Exceptions thrown in Phalcon\Events will use this class */ class Exception extends \Phalcon\Exception diff --git a/ide/stubs/Phalcon/events/Manager.php b/ide/stubs/Phalcon/events/Manager.php index a8cb6f99b..71ed4c70f 100644 --- a/ide/stubs/Phalcon/events/Manager.php +++ b/ide/stubs/Phalcon/events/Manager.php @@ -4,9 +4,11 @@ /** * Phalcon\Events\Manager + * * Phalcon Events Manager, offers an easy way to intercept and manipulate, if needed, * the normal flow of operation. With the EventsManager the developer can create hooks or * plugins that will offer monitoring of data, manipulation, conditional execution and much more. + * */ class Manager implements \Phalcon\Events\ManagerInterface { @@ -26,31 +28,33 @@ class Manager implements \Phalcon\Events\ManagerInterface /** * Attach a listener to the events manager * - * @param string $eventType - * @param object|callable $handler - * @param int $priority + * + * @param string $eventType + * @param object|callable $handler + * @param int $priority */ public function attach($eventType, $handler, $priority = 100) {} /** * Detach the listener from the events manager * - * @param string $eventType - * @param object $handler + * + * @param string $eventType + * @param object $handler */ public function detach($eventType, $handler) {} /** * Set if priorities are enabled in the EventsManager * - * @param bool $enablePriorities + * @param bool $enablePriorities */ public function enablePriorities($enablePriorities) {} /** * Returns if priorities are enabled * - * @return bool + * @return bool */ public function arePrioritiesEnabled() {} @@ -58,7 +62,7 @@ public function arePrioritiesEnabled() {} * Tells the event manager if it needs to collect all the responses returned by every * registered listener in a single fire * - * @param bool $collect + * @param bool $collect */ public function collectResponses($collect) {} @@ -66,60 +70,65 @@ public function collectResponses($collect) {} * Check if the events manager is collecting all all the responses returned by every * registered listener in a single fire * - * @return bool + * @return bool */ public function isCollecting() {} /** * Returns all the responses returned by every handler executed by the last 'fire' executed * - * @return array + * + * @return array */ public function getResponses() {} /** * Removes all events from the EventsManager * - * @param string $type + * @param string $type */ public function detachAll($type = null) {} /** * Internal handler to call a queue of events * - * @param \SplPriorityQueue|array $queue - * @param \Phalcon\Events\Event $event - * @return mixed + * + * @param \SplPriorityQueue|array $queue + * @param \Phalcon\Events\Event $event + * @return mixed */ public final function fireQueue($queue, EventInterface $event) {} /** * Fires an event in the events manager causing the active listeners to be notified about it + * * * $eventsManager->fire("db", $connection); * * - * @param string $eventType - * @param object $source - * @param mixed $data - * @param boolean $cancelable - * @return mixed + * + * @param string $eventType + * @param object $source + * @param mixed $data + * @param boolean $cancelable + * @return mixed */ public function fire($eventType, $source, $data = null, $cancelable = true) {} /** * Check whether certain type of event has listeners * - * @param string $type - * @return bool + * @param string $type + * @return bool */ public function hasListeners($type) {} /** * Returns all the attached listeners of a certain type * - * @param string $type - * @return array + * + * @param string $type + * @return array */ public function getListeners($type) {} diff --git a/ide/stubs/Phalcon/events/ManagerInterface.php b/ide/stubs/Phalcon/events/ManagerInterface.php index 7a60e4162..05c0c5549 100644 --- a/ide/stubs/Phalcon/events/ManagerInterface.php +++ b/ide/stubs/Phalcon/events/ManagerInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Events\Manager + * * Phalcon Events Manager, offers an easy way to intercept and manipulate, if needed, * the normal flow of operation. With the EventsManager the developer can create hooks or * plugins that will offer monitoring of data, manipulation, conditional execution and much more. @@ -14,41 +15,45 @@ interface ManagerInterface /** * Attach a listener to the events manager * - * @param string $eventType - * @param object|callable $handler + * + * @param string $eventType + * @param object|callable $handler */ public function attach($eventType, $handler); /** * Detach the listener from the events manager * - * @param string $eventType - * @param object $handler + * + * @param string $eventType + * @param object $handler */ public function detach($eventType, $handler); /** * Removes all events from the EventsManager * - * @param string $type + * @param string $type */ public function detachAll($type = null); /** * Fires an event in the events manager causing the active listeners to be notified about it * - * @param string $eventType - * @param object $source - * @param mixed $data - * @return mixed + * + * @param string $eventType + * @param object $source + * @param mixed $data + * @return mixed */ public function fire($eventType, $source, $data = null); /** * Returns all the attached listeners of a certain type * - * @param string $type - * @return array + * + * @param string $type + * @return array */ public function getListeners($type); diff --git a/ide/stubs/Phalcon/filter/Exception.php b/ide/stubs/Phalcon/filter/Exception.php index 19125c2f7..3934fccf1 100644 --- a/ide/stubs/Phalcon/filter/Exception.php +++ b/ide/stubs/Phalcon/filter/Exception.php @@ -4,7 +4,9 @@ /** * Phalcon\Filter\Exception + * * Exceptions thrown in Phalcon\Filter will use this class + * */ class Exception extends \Phalcon\Exception { diff --git a/ide/stubs/Phalcon/filter/UserFilterInterface.php b/ide/stubs/Phalcon/filter/UserFilterInterface.php index 299fe2abf..75726ac21 100644 --- a/ide/stubs/Phalcon/filter/UserFilterInterface.php +++ b/ide/stubs/Phalcon/filter/UserFilterInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Filter\UserFilterInterface + * * Interface for Phalcon\Filter user-filters */ interface UserFilterInterface @@ -12,7 +13,7 @@ interface UserFilterInterface /** * Filters a value * - * @param mixed $value + * @param mixed $value */ public function filter($value); diff --git a/ide/stubs/Phalcon/flash/Direct.php b/ide/stubs/Phalcon/flash/Direct.php index ed0248b4e..bfe09e235 100644 --- a/ide/stubs/Phalcon/flash/Direct.php +++ b/ide/stubs/Phalcon/flash/Direct.php @@ -4,6 +4,7 @@ /** * Phalcon\Flash\Direct + * * This is a variant of the Phalcon\Flash that immediately outputs any message passed to it */ class Direct extends \Phalcon\Flash @@ -12,16 +13,16 @@ class Direct extends \Phalcon\Flash /** * Outputs a message * - * @param string $type - * @param mixed $message - * @return string + * @param string $type + * @param mixed $message + * @return string */ public function message($type, $message) {} /** * Prints the messages accumulated in the flasher * - * @param bool $remove + * @param bool $remove */ public function output($remove = true) {} diff --git a/ide/stubs/Phalcon/flash/Exception.php b/ide/stubs/Phalcon/flash/Exception.php index 74c03d0a5..bfaef843f 100644 --- a/ide/stubs/Phalcon/flash/Exception.php +++ b/ide/stubs/Phalcon/flash/Exception.php @@ -4,7 +4,9 @@ /** * Phalcon\Flash\Exception + * * Exceptions thrown in Phalcon\Flash will use this class + * */ class Exception extends \Phalcon\Exception { diff --git a/ide/stubs/Phalcon/flash/Session.php b/ide/stubs/Phalcon/flash/Session.php index fc3c323c5..0feec51f8 100644 --- a/ide/stubs/Phalcon/flash/Session.php +++ b/ide/stubs/Phalcon/flash/Session.php @@ -4,6 +4,7 @@ /** * Phalcon\Flash\Session + * * Temporarily stores the messages in session, then messages can be printed in the next request */ class Session extends \Phalcon\Flash @@ -12,49 +13,49 @@ class Session extends \Phalcon\Flash /** * Returns the messages stored in session * - * @param bool $remove - * @param mixed $type - * @return array + * @param bool $remove + * @param mixed $type + * @return array */ protected function _getSessionMessages($remove, $type = null) {} /** * Stores the messages in session * - * @param array $messages - * @return array + * @param array $messages + * @return array */ protected function _setSessionMessages(array $messages) {} /** * Adds a message to the session flasher * - * @param string $type - * @param string $message + * @param string $type + * @param string $message */ public function message($type, $message) {} /** * Checks whether there are messages * - * @param mixed $type - * @return bool + * @param mixed $type + * @return bool */ public function has($type = null) {} /** * Returns the messages in the session flasher * - * @param mixed $type - * @param bool $remove - * @return array + * @param mixed $type + * @param bool $remove + * @return array */ public function getMessages($type = null, $remove = true) {} /** * Prints the messages in the session flasher * - * @param bool $remove + * @param bool $remove */ public function output($remove = true) {} diff --git a/ide/stubs/Phalcon/forms/Element.php b/ide/stubs/Phalcon/forms/Element.php index fe2faca97..fde883631 100644 --- a/ide/stubs/Phalcon/forms/Element.php +++ b/ide/stubs/Phalcon/forms/Element.php @@ -4,6 +4,7 @@ /** * Phalcon\Forms\Element + * * This is a base class for form elements */ abstract class Element implements \Phalcon\Forms\ElementInterface @@ -39,86 +40,90 @@ abstract class Element implements \Phalcon\Forms\ElementInterface /** * Phalcon\Forms\Element constructor * - * @param string $name - * @param array $attributes + * + * @param string $name + * @param array $attributes */ public function __construct($name, $attributes = null) {} /** * Sets the parent form to the element * - * @param mixed $form - * @return ElementInterface + * @param Form $form + * @return ElementInterface */ public function setForm(Form $form) {} /** * Returns the parent form to the element * - * @return Form + * @return Form */ public function getForm() {} /** * Sets the element name * - * @param string $name - * @return ElementInterface + * @param string $name + * @return ElementInterface */ public function setName($name) {} /** * Returns the element name * - * @return string + * @return string */ public function getName() {} /** * Sets the element filters * - * @param array|string $filters - * @return \Phalcon\Forms\ElementInterface + * + * @param array|string $filters + * @return ElementInterface */ public function setFilters($filters) {} /** * Adds a filter to current list of filters * - * @param string $filter - * @return ElementInterface + * @param string $filter + * @return ElementInterface */ public function addFilter($filter) {} /** * Returns the element filters * - * @return mixed + * + * @return mixed */ public function getFilters() {} /** * Adds a group of validators * - * @param array $validators - * @param bool $merge - * @param \Phalcon\Validation\ValidatorInterface[] - * @return \Phalcon\Forms\ElementInterface + * + * @param array $validators + * @param bool $merge + * @param \Phalcon\Validation\ValidatorInterface[] + * @return ElementInterface */ public function addValidators(array $validators, $merge = true) {} /** * Adds a validator to the element * - * @param mixed $validator - * @return ElementInterface + * @param \Phalcon\Validation\ValidatorInterface $validator + * @return ElementInterface */ public function addValidator(\Phalcon\Validation\ValidatorInterface $validator) {} /** * Returns the validators registered for the element * - * @return ValidatorInterface[] + * @return \Phalcon\Validation\ValidatorInterface[] */ public function getValidators() {} @@ -126,98 +131,103 @@ public function getValidators() {} * Returns an array of prepared attributes for Phalcon\Tag helpers * according to the element parameters * - * @param array $attributes - * @param bool $useChecked - * @return array + * @param array $attributes + * @param bool $useChecked + * @return array */ public function prepareAttributes(array $attributes = null, $useChecked = false) {} /** * Sets a default attribute for the element * - * @param string $attribute - * @param mixed $value - * @return \Phalcon\Forms\ElementInterface + * + * @param string $attribute + * @param mixed $value + * @return ElementInterface */ public function setAttribute($attribute, $value) {} /** * Returns the value of an attribute if present * - * @param string $attribute - * @param mixed $defaultValue - * @return mixed + * + * @param string $attribute + * @param mixed $defaultValue + * @return mixed */ public function getAttribute($attribute, $defaultValue = null) {} /** * Sets default attributes for the element * - * @param array $attributes - * @return ElementInterface + * @param array $attributes + * @return ElementInterface */ public function setAttributes(array $attributes) {} /** * Returns the default attributes for the element * - * @return array + * @return array */ public function getAttributes() {} /** * Sets an option for the element * - * @param string $option - * @param mixed $value - * @return \Phalcon\Forms\ElementInterface + * + * @param string $option + * @param mixed $value + * @return ElementInterface */ public function setUserOption($option, $value) {} /** * Returns the value of an option if present * - * @param string $option - * @param mixed $defaultValue - * @return mixed + * + * @param string $option + * @param mixed $defaultValue + * @return mixed */ public function getUserOption($option, $defaultValue = null) {} /** * Sets options for the element * - * @param array $options - * @return ElementInterface + * @param array $options + * @return ElementInterface */ public function setUserOptions(array $options) {} /** * Returns the options for the element * - * @return array + * @return array */ public function getUserOptions() {} /** * Sets the element label * - * @param string $label - * @return ElementInterface + * @param string $label + * @return ElementInterface */ public function setLabel($label) {} /** * Returns the element label * - * @return string + * @return string */ public function getLabel() {} /** * Generate the HTML to label the element * - * @param array $attributes - * @return string + * + * @param array $attributes + * @return string */ public function label($attributes = null) {} @@ -225,22 +235,23 @@ public function label($attributes = null) {} * Sets a default value in case the form does not use an entity * or there is no value available for the element in _POST * - * @param mixed $value - * @return \Phalcon\Forms\ElementInterface + * + * @param mixed $value + * @return ElementInterface */ public function setDefault($value) {} /** * Returns the default value assigned to the element * - * @return mixed + * @return mixed */ public function getDefault() {} /** * Returns the element value * - * @return mixed + * @return mixed */ public function getValue() {} @@ -248,44 +259,44 @@ public function getValue() {} * Returns the messages that belongs to the element * The element needs to be attached to a form * - * @return \Phalcon\Validation\Message\Group + * @return \Phalcon\Validation\Message\Group */ public function getMessages() {} /** * Checks whether there are messages attached to the element * - * @return bool + * @return bool */ public function hasMessages() {} /** * Sets the validation messages related to the element * - * @param mixed $group - * @return ElementInterface + * @param \Phalcon\Validation\Message\Group $group + * @return ElementInterface */ public function setMessages(\Phalcon\Validation\Message\Group $group) {} /** * Appends a message to the internal message list * - * @param mixed $message - * @return ElementInterface + * @param \Phalcon\Validation\MessageInterface $message + * @return ElementInterface */ public function appendMessage(\Phalcon\Validation\MessageInterface $message) {} /** * Clears every element in the form to its default value * - * @return Element + * @return Element */ public function clear() {} /** * Magic method __toString renders the widget without attributes * - * @return string + * @return string */ public function __toString() {} diff --git a/ide/stubs/Phalcon/forms/ElementInterface.php b/ide/stubs/Phalcon/forms/ElementInterface.php index c88cfb3e3..15ff549fe 100644 --- a/ide/stubs/Phalcon/forms/ElementInterface.php +++ b/ide/stubs/Phalcon/forms/ElementInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Forms\Element + * * Interface for Phalcon\Forms\Element classes */ interface ElementInterface @@ -12,78 +13,81 @@ interface ElementInterface /** * Sets the parent form to the element * - * @param mixed $form - * @return ElementInterface + * @param \Phalcon\Forms\Form $form + * @return ElementInterface */ public function setForm(\Phalcon\Forms\Form $form); /** * Returns the parent form to the element * - * @return \Phalcon\Forms\Form + * @return \Phalcon\Forms\Form */ public function getForm(); /** * Sets the element's name * - * @param string $name - * @return ElementInterface + * @param string $name + * @return ElementInterface */ public function setName($name); /** * Returns the element's name * - * @return string + * @return string */ public function getName(); /** * Sets the element's filters * - * @param array|string $filters - * @return \Phalcon\Forms\ElementInterface + * + * @param array|string $filters + * @return ElementInterface */ public function setFilters($filters); /** * Adds a filter to current list of filters * - * @param string $filter - * @return ElementInterface + * @param string $filter + * @return ElementInterface */ public function addFilter($filter); /** * Returns the element's filters * - * @return mixed + * + * @return mixed */ public function getFilters(); /** * Adds a group of validators * - * @param array $validators - * @param boolean $merge - * @param \Phalcon\Validation\ValidatorInterface[] - * @return \Phalcon\Forms\ElementInterface + * + * @param array $validators + * @param boolean $merge + * @param \Phalcon\Validation\ValidatorInterface[] + * @return ElementInterface */ public function addValidators(array $validators, $merge = true); /** * Adds a validator to the element * - * @param mixed $validator - * @return ElementInterface + * @param \Phalcon\Validation\ValidatorInterface $validator + * @return ElementInterface */ public function addValidator(\Phalcon\Validation\ValidatorInterface $validator); /** * Returns the validators registered for the element * - * @return ValidatorInterface[] + * @return \Phalcon\Validation\ValidatorInterface[] */ public function getValidators(); @@ -91,97 +95,101 @@ public function getValidators(); * Returns an array of prepared attributes for Phalcon\Tag helpers * according to the element's parameters * - * @param array $attributes - * @param bool $useChecked - * @return array + * @param array $attributes + * @param bool $useChecked + * @return array */ public function prepareAttributes(array $attributes = null, $useChecked = false); /** * Sets a default attribute for the element * - * @param string $attribute - * @param mixed $value - * @return \Phalcon\Forms\ElementInterface + * + * @param string $attribute + * @param mixed $value + * @return ElementInterface */ public function setAttribute($attribute, $value); /** * Returns the value of an attribute if present * - * @param string $attribute - * @param mixed $defaultValue - * @return mixed + * + * @param string $attribute + * @param mixed $defaultValue + * @return mixed */ public function getAttribute($attribute, $defaultValue = null); /** * Sets default attributes for the element * - * @param array $attributes - * @return ElementInterface + * @param array $attributes + * @return ElementInterface */ public function setAttributes(array $attributes); /** * Returns the default attributes for the element * - * @return array + * @return array */ public function getAttributes(); /** * Sets an option for the element * - * @param string $option - * @param mixed $value - * @return \Phalcon\Forms\ElementInterface + * + * @param string $option + * @param mixed $value + * @return ElementInterface */ public function setUserOption($option, $value); /** * Returns the value of an option if present * - * @param string $option - * @param mixed $defaultValue - * @return mixed + * + * @param string $option + * @param mixed $defaultValue + * @return mixed */ public function getUserOption($option, $defaultValue = null); /** * Sets options for the element * - * @param array $options - * @return ElementInterface + * @param array $options + * @return ElementInterface */ public function setUserOptions(array $options); /** * Returns the options for the element * - * @return array + * @return array */ public function getUserOptions(); /** * Sets the element label * - * @param string $label - * @return ElementInterface + * @param string $label + * @return ElementInterface */ public function setLabel($label); /** * Returns the element's label * - * @return string + * @return string */ public function getLabel(); /** * Generate the HTML to label the element * - * @return string + * @return string */ public function label(); @@ -189,22 +197,25 @@ public function label(); * Sets a default value in case the form does not use an entity * or there is no value available for the element in _POST * - * @param mixed $value - * @return \Phalcon\Forms\ElementInterface + * + * @param mixed $value + * @return ElementInterface */ public function setDefault($value); /** * Returns the default value assigned to the element * - * @return mixed + * + * @return mixed */ public function getDefault(); /** * Returns the element's value * - * @return mixed + * + * @return mixed */ public function getValue(); @@ -212,45 +223,47 @@ public function getValue(); * Returns the messages that belongs to the element * The element needs to be attached to a form * - * @return \Phalcon\Validation\Message\Group + * + * @return \Phalcon\Validation\Message\Group */ public function getMessages(); /** * Checks whether there are messages attached to the element * - * @return bool + * @return bool */ public function hasMessages(); /** * Sets the validation messages related to the element * - * @param mixed $group - * @return ElementInterface + * @param \Phalcon\Validation\Message\Group $group + * @return ElementInterface */ public function setMessages(\Phalcon\Validation\Message\Group $group); /** * Appends a message to the internal message list * - * @param mixed $message - * @return ElementInterface + * @param \Phalcon\Validation\MessageInterface $message + * @return ElementInterface */ public function appendMessage(\Phalcon\Validation\MessageInterface $message); /** * Clears every element in the form to its default value * - * @return ElementInterface + * @return ElementInterface */ public function clear(); /** * Renders the element widget * - * @param array $attributes - * @return string + * + * @param array $attributes + * @return string */ public function render($attributes = null); diff --git a/ide/stubs/Phalcon/forms/Exception.php b/ide/stubs/Phalcon/forms/Exception.php index 5b7627fcc..43afdabad 100644 --- a/ide/stubs/Phalcon/forms/Exception.php +++ b/ide/stubs/Phalcon/forms/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Forms\Exception + * * Exceptions thrown in Phalcon\Forms will use this class */ class Exception extends \Phalcon\Exception diff --git a/ide/stubs/Phalcon/forms/Form.php b/ide/stubs/Phalcon/forms/Form.php index c4d8a0f21..5fe1699dd 100644 --- a/ide/stubs/Phalcon/forms/Form.php +++ b/ide/stubs/Phalcon/forms/Form.php @@ -4,6 +4,7 @@ /** * Phalcon\Forms\Form + * * This component allows to build forms using an object-oriented interface */ class Form extends \Phalcon\Di\Injectable implements \Countable, \Iterator @@ -21,7 +22,7 @@ class Form extends \Phalcon\Di\Injectable implements \Countable, \Iterator protected $_data; - protected $_elements; + protected $_elements = array(); protected $_elementsIndexed; @@ -37,7 +38,7 @@ class Form extends \Phalcon\Di\Injectable implements \Countable, \Iterator /** - * @param mixed $validation + * @param mixed $validation */ public function setValidation($validation) {} @@ -47,204 +48,213 @@ public function getValidation() {} /** * Phalcon\Forms\Form constructor * - * @param object $entity - * @param array $userOptions + * + * @param object $entity + * @param array $userOptions */ public function __construct($entity = null, $userOptions = null) {} /** * Sets the form's action * - * @param string $action - * @return Form + * @param string $action + * @return Form */ public function setAction($action) {} /** * Returns the form's action * - * @return string + * @return string */ public function getAction() {} /** * Sets an option for the form * - * @param string $option - * @param mixed $value - * @return Form + * + * @param string $option + * @param mixed $value + * @return Form */ public function setUserOption($option, $value) {} /** * Returns the value of an option if present * - * @param string $option - * @param mixed $defaultValue - * @return mixed + * + * @param string $option + * @param mixed $defaultValue + * @return mixed */ public function getUserOption($option, $defaultValue = null) {} /** * Sets options for the element * - * @param array $options - * @return Form + * @param array $options + * @return Form */ public function setUserOptions(array $options) {} /** * Returns the options for the element * - * @return array + * @return array */ public function getUserOptions() {} /** * Sets the entity related to the model * - * @param object $entity - * @return Form + * + * @param object $entity + * @return Form */ public function setEntity($entity) {} /** * Returns the entity related to the model * - * @return object + * + * @return object */ public function getEntity() {} /** * Returns the form elements added to the form * - * @return ElementInterface[] + * @return \Phalcon\Forms\ElementInterface[] */ public function getElements() {} /** * Binds data to the entity * - * @param array $data - * @param object $entity - * @param array $whitelist - * @return Form + * + * @param array $data + * @param object $entity + * @param array $whitelist + * @return Form */ public function bind(array $data, $entity, $whitelist = null) {} /** * Validates the form * - * @param array $data - * @param object $entity - * @return bool + * + * @param array $data + * @param object $entity + * @return bool */ public function isValid($data = null, $entity = null) {} /** * Returns the messages generated in the validation * - * @param bool $byItemName - * @return \Phalcon\Validation\Message\Group + * @param bool $byItemName + * @return \Phalcon\Validation\Message\Group */ public function getMessages($byItemName = false) {} /** * Returns the messages generated for a specific element * - * @param string $name - * @return \Phalcon\Validation\Message\Group + * @param string $name + * @return \Phalcon\Validation\Message\Group */ public function getMessagesFor($name) {} /** * Check if messages were generated for a specific element * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function hasMessagesFor($name) {} /** * Adds an element to the form * - * @param mixed $element - * @param string $position - * @param bool $type - * @return Form + * @param \Phalcon\Forms\ElementInterface $element + * @param string $position + * @param bool $type + * @return Form */ public function add(\Phalcon\Forms\ElementInterface $element, $position = null, $type = null) {} /** * Renders a specific item in the form * - * @param string $name - * @param array $attributes - * @return string + * + * @param string $name + * @param array $attributes + * @return string */ public function render($name, $attributes = null) {} /** * Returns an element added to the form by its name * - * @param string $name - * @return \Phalcon\Forms\ElementInterface + * @param string $name + * @return \Phalcon\Forms\ElementInterface */ public function get($name) {} /** * Generate the label of an element added to the form including HTML * - * @param string $name - * @param array $attributes - * @return string + * @param string $name + * @param array $attributes + * @return string */ public function label($name, array $attributes = null) {} /** * Returns a label for an element * - * @param string $name - * @return string + * @param string $name + * @return string */ public function getLabel($name) {} /** * Gets a value from the internal related entity or from the default value * - * @param string $name - * @return mixed|null + * @param string $name + * @return mixed|null */ public function getValue($name) {} /** * Check if the form contains an element * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function has($name) {} /** * Removes an element from the form * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function remove($name) {} /** * Clears every element in the form to its default value * - * @param array $fields - * @return Form + * + * @param array $fields + * @return Form */ public function clear($fields = null) {} /** * Returns the number of elements in the form * - * @return int + * @return int */ public function count() {} @@ -256,14 +266,14 @@ public function rewind() {} /** * Returns the current element in the iterator * - * @return bool|\Phalcon\Forms\ElementInterface + * @return bool|\Phalcon\Forms\ElementInterface */ public function current() {} /** * Returns the current position/key in the iterator * - * @return int + * @return int */ public function key() {} @@ -275,7 +285,7 @@ public function next() {} /** * Check if the current element in the iterator is valid * - * @return bool + * @return bool */ public function valid() {} diff --git a/ide/stubs/Phalcon/forms/Manager.php b/ide/stubs/Phalcon/forms/Manager.php index 9779aee99..dfec6ab65 100644 --- a/ide/stubs/Phalcon/forms/Manager.php +++ b/ide/stubs/Phalcon/forms/Manager.php @@ -14,34 +14,35 @@ class Manager /** * Creates a form registering it in the forms manager * - * @param string $name - * @param object $entity - * @return \Phalcon\Forms\Form + * + * @param string $name + * @param object $entity + * @return Form */ - public function create($name = null, $entity = null) {} + public function create($name, $entity = null) {} /** * Returns a form by its name * - * @param string $name - * @return Form + * @param string $name + * @return Form */ public function get($name) {} /** * Checks if a form is registered in the forms manager * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function has($name) {} /** * Registers a form in the Forms Manager * - * @param string $name - * @param mixed $form - * @return FormManager + * @param string $name + * @param Form $form + * @return FormManager */ public function set($name, Form $form) {} diff --git a/ide/stubs/Phalcon/forms/element/Check.php b/ide/stubs/Phalcon/forms/element/Check.php index 234f66d6f..ff4b43f8b 100644 --- a/ide/stubs/Phalcon/forms/element/Check.php +++ b/ide/stubs/Phalcon/forms/element/Check.php @@ -4,6 +4,7 @@ /** * Phalcon\Forms\Element\Check + * * Component INPUT[type=check] for forms */ class Check extends \Phalcon\Forms\Element @@ -12,8 +13,9 @@ class Check extends \Phalcon\Forms\Element /** * Renders the element widget returning html * - * @param array $attributes - * @return string + * + * @param array $attributes + * @return string */ public function render($attributes = null) {} diff --git a/ide/stubs/Phalcon/forms/element/Date.php b/ide/stubs/Phalcon/forms/element/Date.php index 05bad6770..baf4ed1f3 100644 --- a/ide/stubs/Phalcon/forms/element/Date.php +++ b/ide/stubs/Phalcon/forms/element/Date.php @@ -4,6 +4,7 @@ /** * Phalcon\Forms\Element\Date + * * Component INPUT[type=date] for forms */ class Date extends \Phalcon\Forms\Element @@ -12,8 +13,9 @@ class Date extends \Phalcon\Forms\Element /** * Renders the element widget returning html * - * @param array $attributes - * @return string + * + * @param array $attributes + * @return string */ public function render($attributes = null) {} diff --git a/ide/stubs/Phalcon/forms/element/Email.php b/ide/stubs/Phalcon/forms/element/Email.php index cd3328523..08de23866 100644 --- a/ide/stubs/Phalcon/forms/element/Email.php +++ b/ide/stubs/Phalcon/forms/element/Email.php @@ -4,6 +4,7 @@ /** * Phalcon\Forms\Element\Email + * * Component INPUT[type=email] for forms */ class Email extends \Phalcon\Forms\Element @@ -12,8 +13,9 @@ class Email extends \Phalcon\Forms\Element /** * Renders the element widget returning html * - * @param array $attributes - * @return string + * + * @param array $attributes + * @return string */ public function render($attributes = null) {} diff --git a/ide/stubs/Phalcon/forms/element/File.php b/ide/stubs/Phalcon/forms/element/File.php index ab0cb0839..28876ebbc 100644 --- a/ide/stubs/Phalcon/forms/element/File.php +++ b/ide/stubs/Phalcon/forms/element/File.php @@ -4,6 +4,7 @@ /** * Phalcon\Forms\Element\File + * * Component INPUT[type=file] for forms */ class File extends \Phalcon\Forms\Element @@ -12,8 +13,9 @@ class File extends \Phalcon\Forms\Element /** * Renders the element widget returning html * - * @param array $attributes - * @return string + * + * @param array $attributes + * @return string */ public function render($attributes = null) {} diff --git a/ide/stubs/Phalcon/forms/element/Hidden.php b/ide/stubs/Phalcon/forms/element/Hidden.php index 6153dcd8c..357c0b642 100644 --- a/ide/stubs/Phalcon/forms/element/Hidden.php +++ b/ide/stubs/Phalcon/forms/element/Hidden.php @@ -4,6 +4,7 @@ /** * Phalcon\Forms\Element\Hidden + * * Component INPUT[type=hidden] for forms */ class Hidden extends \Phalcon\Forms\Element @@ -12,8 +13,9 @@ class Hidden extends \Phalcon\Forms\Element /** * Renders the element widget returning html * - * @param array $attributes - * @return string + * + * @param array $attributes + * @return string */ public function render($attributes = null) {} diff --git a/ide/stubs/Phalcon/forms/element/Numeric.php b/ide/stubs/Phalcon/forms/element/Numeric.php index 7029ae4e3..2ec263b08 100644 --- a/ide/stubs/Phalcon/forms/element/Numeric.php +++ b/ide/stubs/Phalcon/forms/element/Numeric.php @@ -4,6 +4,7 @@ /** * Phalcon\Forms\Element\Numeric + * * Component INPUT[type=number] for forms */ class Numeric extends \Phalcon\Forms\Element @@ -12,9 +13,10 @@ class Numeric extends \Phalcon\Forms\Element /** * Renders the element widget returning html * - * @param mixed $attributes - * @param array $$attributes - * @return string + * + * @param mixed $attributes + * @param array $$attributes + * @return string */ public function render($attributes = null) {} diff --git a/ide/stubs/Phalcon/forms/element/Password.php b/ide/stubs/Phalcon/forms/element/Password.php index bf6186662..fd322bd2d 100644 --- a/ide/stubs/Phalcon/forms/element/Password.php +++ b/ide/stubs/Phalcon/forms/element/Password.php @@ -4,6 +4,7 @@ /** * Phalcon\Forms\Element\Password + * * Component INPUT[type=password] for forms */ class Password extends \Phalcon\Forms\Element @@ -12,9 +13,10 @@ class Password extends \Phalcon\Forms\Element /** * Renders the element widget returning html * - * @param mixed $attributes - * @param array $$attributes - * @return string + * + * @param mixed $attributes + * @param array $$attributes + * @return string */ public function render($attributes = null) {} diff --git a/ide/stubs/Phalcon/forms/element/Radio.php b/ide/stubs/Phalcon/forms/element/Radio.php index 4bf341537..7fd29d7bc 100644 --- a/ide/stubs/Phalcon/forms/element/Radio.php +++ b/ide/stubs/Phalcon/forms/element/Radio.php @@ -4,6 +4,7 @@ /** * Phalcon\Forms\Element\Radio + * * Component INPUT[type=radio] for forms */ class Radio extends \Phalcon\Forms\Element @@ -12,8 +13,9 @@ class Radio extends \Phalcon\Forms\Element /** * Renders the element widget returning html * - * @param array $attributes - * @return string + * + * @param array $attributes + * @return string */ public function render($attributes = null) {} diff --git a/ide/stubs/Phalcon/forms/element/Select.php b/ide/stubs/Phalcon/forms/element/Select.php index 6b6687dd2..aeb0a12b2 100644 --- a/ide/stubs/Phalcon/forms/element/Select.php +++ b/ide/stubs/Phalcon/forms/element/Select.php @@ -4,6 +4,7 @@ /** * Phalcon\Forms\Element\Select + * * Component SELECT (choice) for forms */ class Select extends \Phalcon\Forms\Element @@ -15,40 +16,45 @@ class Select extends \Phalcon\Forms\Element /** * Phalcon\Forms\Element constructor * - * @param string $name - * @param object|array $options - * @param array $attributes + * + * @param string $name + * @param object|array $options + * @param array $attributes */ public function __construct($name, $options = null, $attributes = null) {} /** * Set the choice's options * - * @param array|object $options - * @return \Phalcon\Forms\Element + * + * @param array|object $options + * @return \Phalcon\Forms\Element */ public function setOptions($options) {} /** * Returns the choices' options * - * @return array|object + * + * @return array|object */ public function getOptions() {} /** * Adds an option to the current options * - * @param array $option - * @return this + * + * @param array $option + * @return \Phalcon\Forms\Element */ public function addOption($option) {} /** * Renders the element widget returning html * - * @param array $attributes - * @return string + * + * @param array $attributes + * @return string */ public function render($attributes = null) {} diff --git a/ide/stubs/Phalcon/forms/element/Submit.php b/ide/stubs/Phalcon/forms/element/Submit.php index 9406056da..0f857a084 100644 --- a/ide/stubs/Phalcon/forms/element/Submit.php +++ b/ide/stubs/Phalcon/forms/element/Submit.php @@ -4,6 +4,7 @@ /** * Phalcon\Forms\Element\Submit + * * Component INPUT[type=submit] for forms */ class Submit extends \Phalcon\Forms\Element @@ -12,8 +13,9 @@ class Submit extends \Phalcon\Forms\Element /** * Renders the element widget * - * @param array $attributes - * @return string + * + * @param array $attributes + * @return string */ public function render($attributes = null) {} diff --git a/ide/stubs/Phalcon/forms/element/Text.php b/ide/stubs/Phalcon/forms/element/Text.php index 7c5fb2013..292b20009 100644 --- a/ide/stubs/Phalcon/forms/element/Text.php +++ b/ide/stubs/Phalcon/forms/element/Text.php @@ -4,6 +4,7 @@ /** * Phalcon\Forms\Element\Text + * * Component INPUT[type=text] for forms */ class Text extends \Phalcon\Forms\Element @@ -12,8 +13,9 @@ class Text extends \Phalcon\Forms\Element /** * Renders the element widget * - * @param array $attributes - * @return string + * + * @param array $attributes + * @return string */ public function render($attributes = null) {} diff --git a/ide/stubs/Phalcon/forms/element/TextArea.php b/ide/stubs/Phalcon/forms/element/TextArea.php index f8857a12a..9cf5c09a3 100644 --- a/ide/stubs/Phalcon/forms/element/TextArea.php +++ b/ide/stubs/Phalcon/forms/element/TextArea.php @@ -4,6 +4,7 @@ /** * Phalcon\Forms\Element\TextArea + * * Component TEXTAREA for forms */ class TextArea extends \Phalcon\Forms\Element @@ -12,8 +13,9 @@ class TextArea extends \Phalcon\Forms\Element /** * Renders the element widget * - * @param array $attributes - * @return string + * + * @param array $attributes + * @return string */ public function render($attributes = null) {} diff --git a/ide/stubs/Phalcon/http/Cookie.php b/ide/stubs/Phalcon/http/Cookie.php index b5a528dc0..217e6947f 100644 --- a/ide/stubs/Phalcon/http/Cookie.php +++ b/ide/stubs/Phalcon/http/Cookie.php @@ -4,6 +4,7 @@ /** * Phalcon\Http\Cookie + * * Provide OO wrappers to manage a HTTP cookie */ class Cookie implements \Phalcon\Http\CookieInterface, \Phalcon\Di\InjectionAwareInterface @@ -48,44 +49,47 @@ class Cookie implements \Phalcon\Http\CookieInterface, \Phalcon\Di\InjectionAwar /** * Phalcon\Http\Cookie constructor * - * @param string $name - * @param mixed $value - * @param int $expire - * @param string $path - * @param boolean $secure - * @param string $domain - * @param boolean $httpOnly + * + * @param string $name + * @param mixed $value + * @param int $expire + * @param string $path + * @param boolean $secure + * @param string $domain + * @param boolean $httpOnly */ public function __construct($name, $value = null, $expire = 0, $path = "/", $secure = null, $domain = null, $httpOnly = null) {} /** * Sets the dependency injector * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the internal dependency injector * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI() {} /** * Sets the cookie's value * - * @param string $value - * @return \Phalcon\Http\Cookie + * + * @param string $value + * @return CookieInterface */ public function setValue($value) {} /** * Returns the cookie's value * - * @param string|array $filters - * @param string $defaultValue - * @return mixed + * + * @param string|array $filters + * @param string $defaultValue + * @return mixed */ public function getValue($filters = null, $defaultValue = null) {} @@ -93,7 +97,7 @@ public function getValue($filters = null, $defaultValue = null) {} * Sends the cookie to the HTTP client * Stores the cookie definition in session * - * @return CookieInterface + * @return CookieInterface */ public function send() {} @@ -101,7 +105,7 @@ public function send() {} * Reads the cookie-related info from the SESSION to restore the cookie as it was set * This method is automatically called internally so normally you don't need to call it * - * @return CookieInterface + * @return CookieInterface */ public function restore() {} @@ -113,104 +117,104 @@ public function delete() {} /** * Sets if the cookie must be encrypted/decrypted automatically * - * @param bool $useEncryption - * @return CookieInterface + * @param bool $useEncryption + * @return CookieInterface */ public function useEncryption($useEncryption) {} /** * Check if the cookie is using implicit encryption * - * @return bool + * @return bool */ public function isUsingEncryption() {} /** * Sets the cookie's expiration time * - * @param int $expire - * @return CookieInterface + * @param int $expire + * @return CookieInterface */ public function setExpiration($expire) {} /** * Returns the current expiration time * - * @return string + * @return string */ public function getExpiration() {} /** * Sets the cookie's expiration time * - * @param string $path - * @return CookieInterface + * @param string $path + * @return CookieInterface */ public function setPath($path) {} /** * Returns the current cookie's name * - * @return string + * @return string */ public function getName() {} /** * Returns the current cookie's path * - * @return string + * @return string */ public function getPath() {} /** * Sets the domain that the cookie is available to * - * @param string $domain - * @return CookieInterface + * @param string $domain + * @return CookieInterface */ public function setDomain($domain) {} /** * Returns the domain that the cookie is available to * - * @return string + * @return string */ public function getDomain() {} /** * Sets if the cookie must only be sent when the connection is secure (HTTPS) * - * @param bool $secure - * @return CookieInterface + * @param bool $secure + * @return CookieInterface */ public function setSecure($secure) {} /** * Returns whether the cookie must only be sent when the connection is secure (HTTPS) * - * @return bool + * @return bool */ public function getSecure() {} /** * Sets if the cookie is accessible only through the HTTP protocol * - * @param bool $httpOnly - * @return CookieInterface + * @param bool $httpOnly + * @return CookieInterface */ public function setHttpOnly($httpOnly) {} /** * Returns if the cookie is accessible only through the HTTP protocol * - * @return bool + * @return bool */ public function getHttpOnly() {} /** * Magic __toString method converts the cookie's value to string * - * @return string + * @return string */ public function __toString() {} diff --git a/ide/stubs/Phalcon/http/CookieInterface.php b/ide/stubs/Phalcon/http/CookieInterface.php index 7f5367e24..fcf61323b 100644 --- a/ide/stubs/Phalcon/http/CookieInterface.php +++ b/ide/stubs/Phalcon/http/CookieInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Http\CookieInterface + * * Interface for Phalcon\Http\Cookie */ interface CookieInterface @@ -12,24 +13,26 @@ interface CookieInterface /** * Sets the cookie's value * - * @param string $value - * @return \Phalcon\Http\CookieInterface + * + * @param string $value + * @return CookieInterface */ public function setValue($value); /** * Returns the cookie's value * - * @param string|array $filters - * @param string $defaultValue - * @return mixed + * + * @param string|array $filters + * @param string $defaultValue + * @return mixed */ public function getValue($filters = null, $defaultValue = null); /** * Sends the cookie to the HTTP client * - * @return CookieInterface + * @return CookieInterface */ public function send(); @@ -41,97 +44,97 @@ public function delete(); /** * Sets if the cookie must be encrypted/decrypted automatically * - * @param bool $useEncryption - * @return CookieInterface + * @param bool $useEncryption + * @return CookieInterface */ public function useEncryption($useEncryption); /** * Check if the cookie is using implicit encryption * - * @return bool + * @return bool */ public function isUsingEncryption(); /** * Sets the cookie's expiration time * - * @param int $expire - * @return CookieInterface + * @param int $expire + * @return CookieInterface */ public function setExpiration($expire); /** * Returns the current expiration time * - * @return string + * @return string */ public function getExpiration(); /** * Sets the cookie's expiration time * - * @param string $path - * @return CookieInterface + * @param string $path + * @return CookieInterface */ public function setPath($path); /** * Returns the current cookie's name * - * @return string + * @return string */ public function getName(); /** * Returns the current cookie's path * - * @return string + * @return string */ public function getPath(); /** * Sets the domain that the cookie is available to * - * @param string $domain - * @return CookieInterface + * @param string $domain + * @return CookieInterface */ public function setDomain($domain); /** * Returns the domain that the cookie is available to * - * @return string + * @return string */ public function getDomain(); /** * Sets if the cookie must only be sent when the connection is secure (HTTPS) * - * @param bool $secure - * @return CookieInterface + * @param bool $secure + * @return CookieInterface */ public function setSecure($secure); /** * Returns whether the cookie must only be sent when the connection is secure (HTTPS) * - * @return bool + * @return bool */ public function getSecure(); /** * Sets if the cookie is accessible only through the HTTP protocol * - * @param bool $httpOnly - * @return CookieInterface + * @param bool $httpOnly + * @return CookieInterface */ public function setHttpOnly($httpOnly); /** * Returns if the cookie is accessible only through the HTTP protocol * - * @return bool + * @return bool */ public function getHttpOnly(); diff --git a/ide/stubs/Phalcon/http/Request.php b/ide/stubs/Phalcon/http/Request.php index ef9791a5e..9bd0fcdd2 100644 --- a/ide/stubs/Phalcon/http/Request.php +++ b/ide/stubs/Phalcon/http/Request.php @@ -4,17 +4,23 @@ /** * Phalcon\Http\Request + * * Encapsulates request information for easy and secure access from application controllers. + * * The request object is a simple value object that is passed between the dispatcher and controller classes. * It packages the HTTP request environment. + * * * use Phalcon\Http\Request; + * * $request = new Request(); + * * if ($request->isPost()) { - * if ($request->isAjax()) { - * echo "Request was made using POST and AJAX"; - * } + * if ($request->isAjax()) { + * echo "Request was made using POST and AJAX"; + * } * } + * * $request->getServer("HTTP_HOST"); // Retrieve SERVER variables * $request->getMethod(); // GET, POST, PUT, DELETE, HEAD, OPTIONS, PATCH, PURGE, TRACE, CONNECT * $request->getLanguages(); // An array of languages the client accepts @@ -45,98 +51,107 @@ class Request implements \Phalcon\Http\RequestInterface, \Phalcon\Di\InjectionAw public function getHttpMethodParameterOverride() {} /** - * @param mixed $httpMethodParameterOverride + * @param mixed $httpMethodParameterOverride */ public function setHttpMethodParameterOverride($httpMethodParameterOverride) {} /** * Sets the dependency injector * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the internal dependency injector * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI() {} /** * Gets a variable from the $_REQUEST superglobal applying filters if needed. * If no parameters are given the $_REQUEST superglobal is returned + * * * // Returns value from $_REQUEST["user_email"] without sanitizing * $userEmail = $request->get("user_email"); + * * // Returns value from $_REQUEST["user_email"] with sanitizing * $userEmail = $request->get("user_email", "email"); * * - * @param string $name - * @param mixed $filters - * @param mixed $defaultValue - * @param bool $notAllowEmpty - * @param bool $noRecursive - * @return mixed + * @param string $name + * @param mixed $filters + * @param mixed $defaultValue + * @param bool $notAllowEmpty + * @param bool $noRecursive + * @return mixed */ public function get($name = null, $filters = null, $defaultValue = null, $notAllowEmpty = false, $noRecursive = false) {} /** * Gets a variable from the $_POST superglobal applying filters if needed * If no parameters are given the $_POST superglobal is returned + * * * // Returns value from $_POST["user_email"] without sanitizing * $userEmail = $request->getPost("user_email"); + * * // Returns value from $_POST["user_email"] with sanitizing * $userEmail = $request->getPost("user_email", "email"); * * - * @param string $name - * @param mixed $filters - * @param mixed $defaultValue - * @param bool $notAllowEmpty - * @param bool $noRecursive - * @return mixed + * @param string $name + * @param mixed $filters + * @param mixed $defaultValue + * @param bool $notAllowEmpty + * @param bool $noRecursive + * @return mixed */ public function getPost($name = null, $filters = null, $defaultValue = null, $notAllowEmpty = false, $noRecursive = false) {} /** * Gets a variable from put request + * * * // Returns value from $_PUT["user_email"] without sanitizing * $userEmail = $request->getPut("user_email"); + * * // Returns value from $_PUT["user_email"] with sanitizing * $userEmail = $request->getPut("user_email", "email"); * * - * @param string $name - * @param mixed $filters - * @param mixed $defaultValue - * @param bool $notAllowEmpty - * @param bool $noRecursive - * @return mixed + * @param string $name + * @param mixed $filters + * @param mixed $defaultValue + * @param bool $notAllowEmpty + * @param bool $noRecursive + * @return mixed */ public function getPut($name = null, $filters = null, $defaultValue = null, $notAllowEmpty = false, $noRecursive = false) {} /** * Gets variable from $_GET superglobal applying filters if needed * If no parameters are given the $_GET superglobal is returned + * * * // Returns value from $_GET["id"] without sanitizing * $id = $request->getQuery("id"); + * * // Returns value from $_GET["id"] with sanitizing * $id = $request->getQuery("id", "int"); + * * // Returns value from $_GET["id"] with a default value * $id = $request->getQuery("id", null, 150); * * - * @param string $name - * @param mixed $filters - * @param mixed $defaultValue - * @param bool $notAllowEmpty - * @param bool $noRecursive - * @return mixed + * @param string $name + * @param mixed $filters + * @param mixed $defaultValue + * @param bool $notAllowEmpty + * @param bool $noRecursive + * @return mixed */ public function getQuery($name = null, $filters = null, $defaultValue = null, $notAllowEmpty = false, $noRecursive = false) {} @@ -144,197 +159,209 @@ public function getQuery($name = null, $filters = null, $defaultValue = null, $n * Helper to get data from superglobals, applying filters if needed. * If no parameters are given the superglobal is returned. * - * @param array $source - * @param string $name - * @param mixed $filters - * @param mixed $defaultValue - * @param bool $notAllowEmpty - * @param bool $noRecursive - * @return mixed + * @param array $source + * @param string $name + * @param mixed $filters + * @param mixed $defaultValue + * @param bool $notAllowEmpty + * @param bool $noRecursive + * @return mixed */ protected final function getHelper(array $source, $name = null, $filters = null, $defaultValue = null, $notAllowEmpty = false, $noRecursive = false) {} /** * Gets variable from $_SERVER superglobal * - * @param string $name - * @return string|null + * @param string $name + * @return string|null */ public function getServer($name) {} /** * Checks whether $_REQUEST superglobal has certain index * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function has($name) {} /** * Checks whether $_POST superglobal has certain index * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function hasPost($name) {} /** * Checks whether the PUT data has certain index * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function hasPut($name) {} /** * Checks whether $_GET superglobal has certain index * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function hasQuery($name) {} /** * Checks whether $_SERVER superglobal has certain index * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public final function hasServer($name) {} /** * Gets HTTP header from request data * - * @param string $header - * @return string + * @param string $header + * @return string */ public final function getHeader($header) {} /** * Gets HTTP schema (http/https) * - * @return string + * @return string */ public function getScheme() {} /** * Checks whether request has been made using ajax * - * @return bool + * @return bool */ public function isAjax() {} /** * Checks whether request has been made using SOAP * - * @return bool + * @return bool */ public function isSoap() {} /** * Alias of isSoap(). It will be deprecated in future versions * - * @return bool + * @deprecated + * @return bool */ public function isSoapRequested() {} /** * Checks whether request has been made using any secure layer * - * @return bool + * @return bool */ public function isSecure() {} /** * Alias of isSecure(). It will be deprecated in future versions * - * @return bool + * @deprecated + * @return bool */ public function isSecureRequest() {} /** * Gets HTTP raw request body * - * @return string + * @return string */ public function getRawBody() {} /** * Gets decoded JSON HTTP raw request body * - * @param bool $associative - * @return array|bool|\stdClass + * @param bool $associative + * @return array|bool|\stdClass */ public function getJsonRawBody($associative = false) {} /** * Gets active server address IP * - * @return string + * @return string */ public function getServerAddress() {} /** * Gets active server name * - * @return string + * @return string */ public function getServerName() {} /** * Gets host name used by the request. + * * `Request::getHttpHost` trying to find host name in following order: + * * - `$_SERVER["HTTP_HOST"]` * - `$_SERVER["SERVER_NAME"]` * - `$_SERVER["SERVER_ADDR"]` + * * Optionally `Request::getHttpHost` validates and clean host name. * The `Request::$_strictHostCheck` can be used to validate host name. + * * Note: validation and cleaning have a negative performance impact because * they use regular expressions. + * * * use Phalcon\Http\Request; + * * $request = new Request; + * * $_SERVER["HTTP_HOST"] = "example.com"; * $request->getHttpHost(); // example.com + * * $_SERVER["HTTP_HOST"] = "example.com:8080"; * $request->getHttpHost(); // example.com:8080 + * * $request->setStrictHostCheck(true); * $_SERVER["HTTP_HOST"] = "ex=am~ple.com"; * $request->getHttpHost(); // UnexpectedValueException + * * $_SERVER["HTTP_HOST"] = "ExAmPlE.com"; * $request->getHttpHost(); // example.com * * - * @return string + * @return string */ public function getHttpHost() {} /** * Sets if the `Request::getHttpHost` method must be use strict validation of host name or not * - * @param bool $flag - * @return Request + * @param bool $flag + * @return Request */ public function setStrictHostCheck($flag = true) {} /** * Checks if the `Request::getHttpHost` method will be use strict validation of host name or not * - * @return bool + * @return bool */ public function isStrictHostCheck() {} /** * Gets information about the port on which the request is made. * - * @return int + * @return int */ public function getPort() {} /** * Gets HTTP URI which request has been made * - * @return string + * @return string */ public final function getURI() {} @@ -342,35 +369,38 @@ public final function getURI() {} * Gets most possible client IPv4 Address. This method searches in * $_SERVER["REMOTE_ADDR"] and optionally in $_SERVER["HTTP_X_FORWARDED_FOR"] * - * @param bool $trustForwardedHeader - * @return string|bool + * @param bool $trustForwardedHeader + * @return string|bool */ public function getClientAddress($trustForwardedHeader = false) {} /** * Gets HTTP method which request has been made + * * If the X-HTTP-Method-Override header is set, and if the method is a POST, * then it is used to determine the "real" intended HTTP method. + * * The _method request parameter can also be used to determine the HTTP method, * but only if setHttpMethodParameterOverride(true) has been called. + * * The method is always an uppercased string. * - * @return string + * @return string */ public final function getMethod() {} /** * Gets HTTP user agent used to made the request * - * @return string + * @return string */ public function getUserAgent() {} /** * Checks if a method is a valid HTTP method * - * @param string $method - * @return bool + * @param string $method + * @return bool */ public function isValidHttpMethod($method) {} @@ -378,212 +408,212 @@ public function isValidHttpMethod($method) {} * Check if HTTP method match any of the passed methods * When strict is true it checks if validated methods are real HTTP methods * - * @param mixed $methods - * @param bool $strict - * @return bool + * @param mixed $methods + * @param bool $strict + * @return bool */ public function isMethod($methods, $strict = false) {} /** * Checks whether HTTP method is POST. if _SERVER["REQUEST_METHOD"]==="POST" * - * @return bool + * @return bool */ public function isPost() {} /** * Checks whether HTTP method is GET. if _SERVER["REQUEST_METHOD"]==="GET" * - * @return bool + * @return bool */ public function isGet() {} /** * Checks whether HTTP method is PUT. if _SERVER["REQUEST_METHOD"]==="PUT" * - * @return bool + * @return bool */ public function isPut() {} /** * Checks whether HTTP method is PATCH. if _SERVER["REQUEST_METHOD"]==="PATCH" * - * @return bool + * @return bool */ public function isPatch() {} /** * Checks whether HTTP method is HEAD. if _SERVER["REQUEST_METHOD"]==="HEAD" * - * @return bool + * @return bool */ public function isHead() {} /** * Checks whether HTTP method is DELETE. if _SERVER["REQUEST_METHOD"]==="DELETE" * - * @return bool + * @return bool */ public function isDelete() {} /** * Checks whether HTTP method is OPTIONS. if _SERVER["REQUEST_METHOD"]==="OPTIONS" * - * @return bool + * @return bool */ public function isOptions() {} /** * Checks whether HTTP method is PURGE (Squid and Varnish support). if _SERVER["REQUEST_METHOD"]==="PURGE" * - * @return bool + * @return bool */ public function isPurge() {} /** * Checks whether HTTP method is TRACE. if _SERVER["REQUEST_METHOD"]==="TRACE" * - * @return bool + * @return bool */ public function isTrace() {} /** * Checks whether HTTP method is CONNECT. if _SERVER["REQUEST_METHOD"]==="CONNECT" * - * @return bool + * @return bool */ public function isConnect() {} /** * Checks whether request include attached files * - * @param bool $onlySuccessful - * @return long + * @param bool $onlySuccessful + * @return long */ public function hasFiles($onlySuccessful = false) {} /** * Recursively counts file in an array of files * - * @param mixed $data - * @param bool $onlySuccessful - * @return long + * @param mixed $data + * @param bool $onlySuccessful + * @return long */ protected final function hasFileHelper($data, $onlySuccessful) {} /** * Gets attached files as Phalcon\Http\Request\File instances * - * @param bool $onlySuccessful - * @return File[] + * @param bool $onlySuccessful + * @return \Phalcon\Http\Request\File[] */ public function getUploadedFiles($onlySuccessful = false) {} /** * Smooth out $_FILES to have plain array with all files uploaded * - * @param array $names - * @param array $types - * @param array $tmp_names - * @param array $sizes - * @param array $errors - * @param string $prefix - * @return array + * @param array $names + * @param array $types + * @param array $tmp_names + * @param array $sizes + * @param array $errors + * @param string $prefix + * @return array */ protected final function smoothFiles(array $names, array $types, array $tmp_names, array $sizes, array $errors, $prefix) {} /** * Returns the available headers in the request * - * @return array + * @return array */ public function getHeaders() {} /** * Gets web page that refers active request. ie: http://www.google.com * - * @return string + * @return string */ public function getHTTPReferer() {} /** * Process a request header and return an array of values with their qualities * - * @param string $serverIndex - * @param string $name - * @return array + * @param string $serverIndex + * @param string $name + * @return array */ protected final function _getQualityHeader($serverIndex, $name) {} /** * Process a request header and return the one with best quality * - * @param array $qualityParts - * @param string $name - * @return string + * @param array $qualityParts + * @param string $name + * @return string */ protected final function _getBestQuality(array $qualityParts, $name) {} /** * Gets content type which request has been made * - * @return string|null + * @return string|null */ public function getContentType() {} /** * Gets an array with mime/types and their quality accepted by the browser/client from _SERVER["HTTP_ACCEPT"] * - * @return array + * @return array */ public function getAcceptableContent() {} /** * Gets best mime/type accepted by the browser/client from _SERVER["HTTP_ACCEPT"] * - * @return string + * @return string */ public function getBestAccept() {} /** * Gets a charsets array and their quality accepted by the browser/client from _SERVER["HTTP_ACCEPT_CHARSET"] * - * @return mixed + * @return mixed */ public function getClientCharsets() {} /** * Gets best charset accepted by the browser/client from _SERVER["HTTP_ACCEPT_CHARSET"] * - * @return string + * @return string */ public function getBestCharset() {} /** * Gets languages array and their quality accepted by the browser/client from _SERVER["HTTP_ACCEPT_LANGUAGE"] * - * @return array + * @return array */ public function getLanguages() {} /** * Gets best language accepted by the browser/client from _SERVER["HTTP_ACCEPT_LANGUAGE"] * - * @return string + * @return string */ public function getBestLanguage() {} /** * Gets auth info accepted by the browser/client from $_SERVER["PHP_AUTH_USER"] * - * @return array|null + * @return array|null */ public function getBasicAuth() {} /** * Gets auth info accepted by the browser/client from $_SERVER["PHP_AUTH_DIGEST"] * - * @return array + * @return array */ public function getDigestAuth() {} diff --git a/ide/stubs/Phalcon/http/RequestInterface.php b/ide/stubs/Phalcon/http/RequestInterface.php index afc9ec5a0..06befc5f9 100644 --- a/ide/stubs/Phalcon/http/RequestInterface.php +++ b/ide/stubs/Phalcon/http/RequestInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Http\RequestInterface + * * Interface for Phalcon\Http\Request */ interface RequestInterface @@ -12,149 +13,153 @@ interface RequestInterface /** * Gets a variable from the $_REQUEST superglobal applying filters if needed * - * @param string $name - * @param string|array $filters - * @param mixed $defaultValue - * @return mixed + * + * @param string $name + * @param string|array $filters + * @param mixed $defaultValue + * @return mixed */ public function get($name = null, $filters = null, $defaultValue = null); /** * Gets a variable from the $_POST superglobal applying filters if needed * - * @param string $name - * @param string|array $filters - * @param mixed $defaultValue - * @return mixed + * + * @param string $name + * @param string|array $filters + * @param mixed $defaultValue + * @return mixed */ public function getPost($name = null, $filters = null, $defaultValue = null); /** * Gets variable from $_GET superglobal applying filters if needed * - * @param string $name - * @param string|array $filters - * @param mixed $defaultValue - * @return mixed + * + * @param string $name + * @param string|array $filters + * @param mixed $defaultValue + * @return mixed */ public function getQuery($name = null, $filters = null, $defaultValue = null); /** * Gets variable from $_SERVER superglobal * - * @param string $name - * @return mixed + * + * @param string $name + * @return mixed */ public function getServer($name); /** * Checks whether $_REQUEST superglobal has certain index * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function has($name); /** * Checks whether $_POST superglobal has certain index * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function hasPost($name); /** * Checks whether the PUT data has certain index * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function hasPut($name); /** * Checks whether $_GET superglobal has certain index * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function hasQuery($name); /** * Checks whether $_SERVER superglobal has certain index * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function hasServer($name); /** * Gets HTTP header from request data * - * @param string $header - * @return string + * @param string $header + * @return string */ public function getHeader($header); /** * Gets HTTP schema (http/https) * - * @return string + * @return string */ public function getScheme(); /** * Checks whether request has been made using ajax. Checks if $_SERVER["HTTP_X_REQUESTED_WITH"] === "XMLHttpRequest" * - * @return bool + * @return bool */ public function isAjax(); /** * Checks whether request has been made using SOAP * - * @return bool + * @return bool */ public function isSoapRequested(); /** * Checks whether request has been made using any secure layer * - * @return bool + * @return bool */ public function isSecureRequest(); /** * Gets HTTP raw request body * - * @return string + * @return string */ public function getRawBody(); /** * Gets active server address IP * - * @return string + * @return string */ public function getServerAddress(); /** * Gets active server name * - * @return string + * @return string */ public function getServerName(); /** * Gets host name used by the request * - * @return string + * @return string */ public function getHttpHost(); /** * Gets information about the port on which the request is made * - * @return int + * @return int */ public function getPort(); @@ -162,173 +167,176 @@ public function getPort(); * Gets most possibly client IPv4 Address. This methods searches in * $_SERVER["REMOTE_ADDR"] and optionally in $_SERVER["HTTP_X_FORWARDED_FOR"] * - * @param bool $trustForwardedHeader - * @return string + * @param bool $trustForwardedHeader + * @return string */ public function getClientAddress($trustForwardedHeader = false); /** * Gets HTTP method which request has been made * - * @return string + * @return string */ public function getMethod(); /** * Gets HTTP user agent used to made the request * - * @return string + * @return string */ public function getUserAgent(); /** * Check if HTTP method match any of the passed methods * - * @param string|array $methods - * @param bool $strict - * @return boolean + * + * @param string|array $methods + * @param bool $strict + * @return bool */ public function isMethod($methods, $strict = false); /** * Checks whether HTTP method is POST. if $_SERVER["REQUEST_METHOD"] === "POST" * - * @return bool + * @return bool */ public function isPost(); /** * Checks whether HTTP method is GET. if $_SERVER["REQUEST_METHOD"] === "GET" * - * @return bool + * @return bool */ public function isGet(); /** * Checks whether HTTP method is PUT. if $_SERVER["REQUEST_METHOD"] === "PUT" * - * @return bool + * @return bool */ public function isPut(); /** * Checks whether HTTP method is HEAD. if $_SERVER["REQUEST_METHOD"] === "HEAD" * - * @return bool + * @return bool */ public function isHead(); /** * Checks whether HTTP method is DELETE. if $_SERVER["REQUEST_METHOD"] === "DELETE" * - * @return bool + * @return bool */ public function isDelete(); /** * Checks whether HTTP method is OPTIONS. if $_SERVER["REQUEST_METHOD"] === "OPTIONS" * - * @return bool + * @return bool */ public function isOptions(); /** * Checks whether HTTP method is PURGE (Squid and Varnish support). if $_SERVER["REQUEST_METHOD"] === "PURGE" * - * @return bool + * @return bool */ public function isPurge(); /** * Checks whether HTTP method is TRACE. if $_SERVER["REQUEST_METHOD"] === "TRACE" * - * @return bool + * @return bool */ public function isTrace(); /** * Checks whether HTTP method is CONNECT. if $_SERVER["REQUEST_METHOD"] === "CONNECT" * - * @return bool + * @return bool */ public function isConnect(); /** * Checks whether request include attached files * - * @param boolean $onlySuccessful - * @return boolean + * + * @param boolean $onlySuccessful + * @return boolean */ public function hasFiles($onlySuccessful = false); /** * Gets attached files as Phalcon\Http\Request\FileInterface compatible instances * - * @param bool $onlySuccessful - * @return \Phalcon\Http\Request\FileInterface[] + * @param bool $onlySuccessful + * @return \Phalcon\Http\Request\FileInterface[] */ public function getUploadedFiles($onlySuccessful = false); /** * Gets web page that refers active request. ie: http://www.google.com * - * @return string + * @return string */ public function getHTTPReferer(); /** * Gets array with mime/types and their quality accepted by the browser/client from $_SERVER["HTTP_ACCEPT"] * - * @return array + * @return array */ public function getAcceptableContent(); /** * Gets best mime/type accepted by the browser/client from $_SERVER["HTTP_ACCEPT"] * - * @return string + * @return string */ public function getBestAccept(); /** * Gets charsets array and their quality accepted by the browser/client from $_SERVER["HTTP_ACCEPT_CHARSET"] * - * @return array + * @return array */ public function getClientCharsets(); /** * Gets best charset accepted by the browser/client from $_SERVER["HTTP_ACCEPT_CHARSET"] * - * @return string + * @return string */ public function getBestCharset(); /** * Gets languages array and their quality accepted by the browser/client from _SERVER["HTTP_ACCEPT_LANGUAGE"] * - * @return array + * @return array */ public function getLanguages(); /** * Gets best language accepted by the browser/client from $_SERVER["HTTP_ACCEPT_LANGUAGE"] * - * @return string + * @return string */ public function getBestLanguage(); /** * Gets auth info accepted by the browser/client from $_SERVER["PHP_AUTH_USER"] * - * @return array + * + * @return array */ public function getBasicAuth(); /** * Gets auth info accepted by the browser/client from $_SERVER["PHP_AUTH_DIGEST"] * - * @return array + * @return array */ public function getDigestAuth(); diff --git a/ide/stubs/Phalcon/http/Response.php b/ide/stubs/Phalcon/http/Response.php index 00722c47e..83a799456 100644 --- a/ide/stubs/Phalcon/http/Response.php +++ b/ide/stubs/Phalcon/http/Response.php @@ -4,13 +4,17 @@ /** * Phalcon\Http\Response + * * Part of the HTTP cycle is return responses to the clients. * Phalcon\HTTP\Response is the Phalcon component responsible to achieve this task. * HTTP responses are usually composed by headers and body. + * * * $response = new \Phalcon\Http\Response(); + * * $response->setStatusCode(200, "OK"); * $response->setContent("Hello"); + * * $response->send(); * */ @@ -38,292 +42,307 @@ class Response implements \Phalcon\Http\ResponseInterface, \Phalcon\Di\Injection /** * Phalcon\Http\Response constructor * - * @param mixed $content - * @param mixed $code - * @param mixed $status + * @param mixed $content + * @param mixed $code + * @param mixed $status */ public function __construct($content = null, $code = null, $status = null) {} /** * Sets the dependency injector * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the internal dependency injector * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI() {} /** * Sets the HTTP response code + * * * $response->setStatusCode(404, "Not Found"); * * - * @param int $code - * @param string $message - * @return Response + * @param int $code + * @param string $message + * @return Response */ public function setStatusCode($code, $message = null) {} /** * Returns the status code + * * * print_r( - * $response->getStatusCode() + * $response->getStatusCode() * ); * * - * @return array + * @return array */ public function getStatusCode() {} /** * Sets a headers bag for the response externally * - * @param mixed $headers - * @return Response + * @param \Phalcon\Http\Response\HeadersInterface $headers + * @return Response */ public function setHeaders(\Phalcon\Http\Response\HeadersInterface $headers) {} /** * Returns headers set by the user * - * @return \Phalcon\Http\Response\HeadersInterface + * @return \Phalcon\Http\Response\HeadersInterface */ public function getHeaders() {} /** * Sets a cookies bag for the response externally * - * @param mixed $cookies - * @return Response + * @param \Phalcon\Http\Response\CookiesInterface $cookies + * @return Response */ public function setCookies(\Phalcon\Http\Response\CookiesInterface $cookies) {} /** * Returns cookies set by the user * - * @return \Phalcon\Http\Response\CookiesInterface + * + * @return \Phalcon\Http\Response\CookiesInterface */ public function getCookies() {} /** * Overwrites a header in the response + * * * $response->setHeader("Content-Type", "text/plain"); * * - * @param string $name - * @param mixed $value - * @return Response + * @param string $name + * @param mixed $value + * @return Response */ public function setHeader($name, $value) {} /** * Send a raw header to the response + * * * $response->setRawHeader("HTTP/1.1 404 Not Found"); * * - * @param string $header - * @return Response + * @param string $header + * @return Response */ public function setRawHeader($header) {} /** * Resets all the established headers * - * @return Response + * @return Response */ public function resetHeaders() {} /** * Sets an Expires header in the response that allows to use the HTTP cache + * * * $this->response->setExpires( - * new DateTime() + * new DateTime() * ); * * - * @param mixed $datetime - * @return Response + * @param \DateTime $datetime + * @return Response */ public function setExpires(\DateTime $datetime) {} /** * Sets Last-Modified header + * * * $this->response->setLastModified( - * new DateTime() + * new DateTime() * ); * * - * @param mixed $datetime - * @return Response + * @param \DateTime $datetime + * @return Response */ public function setLastModified(\DateTime $datetime) {} /** * Sets Cache headers to use HTTP cache + * * * $this->response->setCache(60); * * - * @param int $minutes - * @return Response + * @param int $minutes + * @return Response */ public function setCache($minutes) {} /** * Sends a Not-Modified response * - * @return Response + * @return Response */ public function setNotModified() {} /** * Sets the response content-type mime, optionally the charset + * * * $response->setContentType("application/pdf"); * $response->setContentType("text/plain", "UTF-8"); * * - * @param string $contentType - * @param mixed $charset - * @return Response + * @param string $contentType + * @param mixed $charset + * @return Response */ public function setContentType($contentType, $charset = null) {} /** * Sets the response content-length + * * * $response->setContentLength(2048); * * - * @param int $contentLength - * @return Response + * @param int $contentLength + * @return Response */ public function setContentLength($contentLength) {} /** * Set a custom ETag + * * * $response->setEtag(md5(time())); * * - * @param string $etag - * @return Response + * @param string $etag + * @return Response */ public function setEtag($etag) {} /** * Redirect by HTTP to another action or URL + * * * // Using a string redirect (internal/external) * $response->redirect("posts/index"); * $response->redirect("http://en.wikipedia.org", true); * $response->redirect("http://www.example.com/new-location", true, 301); + * * // Making a redirection based on a named route * $response->redirect( - * [ - * "for" => "index-lang", - * "lang" => "jp", - * "controller" => "index", - * ] + * [ + * "for" => "index-lang", + * "lang" => "jp", + * "controller" => "index", + * ] * ); * * - * @param mixed $location - * @param bool $externalRedirect - * @param int $statusCode - * @return Response + * @param mixed $location + * @param bool $externalRedirect + * @param int $statusCode + * @return Response */ public function redirect($location = null, $externalRedirect = false, $statusCode = 302) {} /** * Sets HTTP response body + * * * $response->setContent("

Hello!

"); *
* - * @param string $content - * @return Response + * @param string $content + * @return Response */ public function setContent($content) {} /** * Sets HTTP response body. The parameter is automatically converted to JSON * and also sets default header: Content-Type: "application/json; charset=UTF-8" + * * * $response->setJsonContent( - * [ - * "status" => "OK", - * ] + * [ + * "status" => "OK", + * ] * ); * * - * @param mixed $content - * @param int $jsonOptions - * @param int $depth - * @return Response + * @param mixed $content + * @param int $jsonOptions + * @param int $depth + * @return Response */ public function setJsonContent($content, $jsonOptions = 0, $depth = 512) {} /** * Appends a string to the HTTP response body * - * @param mixed $content - * @return Response + * @param mixed $content + * @return Response */ public function appendContent($content) {} /** * Gets the HTTP response body * - * @return string + * @return string */ public function getContent() {} /** * Check if the response is already sent * - * @return bool + * @return bool */ public function isSent() {} /** * Sends headers to the client * - * @return Response + * @return Response */ public function sendHeaders() {} /** * Sends cookies to the client * - * @return Response + * @return Response */ public function sendCookies() {} /** * Prints out HTTP response to the client * - * @return Response + * @return Response */ public function send() {} /** * Sets an attached file to be sent at the end of the request * - * @param string $filePath - * @param mixed $attachmentName - * @param mixed $attachment - * @return Response + * @param string $filePath + * @param mixed $attachmentName + * @param mixed $attachment + * @return Response */ public function setFileToSend($filePath, $attachmentName = null, $attachment = true) {} diff --git a/ide/stubs/Phalcon/http/ResponseInterface.php b/ide/stubs/Phalcon/http/ResponseInterface.php index f1a714994..cd1cb69b6 100644 --- a/ide/stubs/Phalcon/http/ResponseInterface.php +++ b/ide/stubs/Phalcon/http/ResponseInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Http\Response + * * Interface for Phalcon\Http\Response */ interface ResponseInterface @@ -12,150 +13,152 @@ interface ResponseInterface /** * Sets the HTTP response code * - * @param int $code - * @param string $message - * @return ResponseInterface + * @param int $code + * @param string $message + * @return ResponseInterface */ public function setStatusCode($code, $message = null); /** * Returns headers set by the user * - * @return \Phalcon\Http\Response\HeadersInterface + * @return \Phalcon\Http\Response\HeadersInterface */ public function getHeaders(); /** * Overwrites a header in the response * - * @param string $name - * @param mixed $value - * @return ResponseInterface + * @param string $name + * @param mixed $value + * @return ResponseInterface */ public function setHeader($name, $value); /** * Send a raw header to the response * - * @param string $header - * @return ResponseInterface + * @param string $header + * @return ResponseInterface */ public function setRawHeader($header); /** * Resets all the established headers * - * @return ResponseInterface + * @return ResponseInterface */ public function resetHeaders(); /** * Sets output expire time header * - * @param mixed $datetime - * @return ResponseInterface + * @param \DateTime $datetime + * @return ResponseInterface */ public function setExpires(\DateTime $datetime); /** * Sends a Not-Modified response * - * @return ResponseInterface + * @return ResponseInterface */ public function setNotModified(); /** * Sets the response content-type mime, optionally the charset * - * @param string $contentType - * @param string $charset - * @return \Phalcon\Http\ResponseInterface + * + * @param string $contentType + * @param string $charset + * @return ResponseInterface */ public function setContentType($contentType, $charset = null); /** * Sets the response content-length * - * @param int $contentLength - * @return ResponseInterface + * @param int $contentLength + * @return ResponseInterface */ public function setContentLength($contentLength); /** * Redirect by HTTP to another action or URL * - * @param mixed $location - * @param bool $externalRedirect - * @param int $statusCode - * @return ResponseInterface + * @param mixed $location + * @param bool $externalRedirect + * @param int $statusCode + * @return ResponseInterface */ public function redirect($location = null, $externalRedirect = false, $statusCode = 302); /** * Sets HTTP response body * - * @param string $content - * @return ResponseInterface + * @param string $content + * @return ResponseInterface */ public function setContent($content); /** * Sets HTTP response body. The parameter is automatically converted to JSON + * * * $response->setJsonContent( - * [ - * "status" => "OK", - * ] + * [ + * "status" => "OK", + * ] * ); * * - * @param mixed $content - * @return ResponseInterface + * @param mixed $content + * @return ResponseInterface */ public function setJsonContent($content); /** * Appends a string to the HTTP response body * - * @param mixed $content - * @return ResponseInterface + * @param mixed $content + * @return ResponseInterface */ public function appendContent($content); /** * Gets the HTTP response body * - * @return string + * @return string */ public function getContent(); /** * Sends headers to the client * - * @return ResponseInterface + * @return ResponseInterface */ public function sendHeaders(); /** * Sends cookies to the client * - * @return ResponseInterface + * @return ResponseInterface */ public function sendCookies(); /** * Prints out HTTP response to the client * - * @return ResponseInterface + * @return ResponseInterface */ public function send(); /** * Sets an attached file to be sent at the end of the request * - * @param string $filePath - * @param mixed $attachmentName - * @return ResponseInterface + * @param string $filePath + * @param mixed $attachmentName + * @return ResponseInterface */ public function setFileToSend($filePath, $attachmentName = null); diff --git a/ide/stubs/Phalcon/http/cookie/Exception.php b/ide/stubs/Phalcon/http/cookie/Exception.php index a3dbbd67d..697aed9df 100644 --- a/ide/stubs/Phalcon/http/cookie/Exception.php +++ b/ide/stubs/Phalcon/http/cookie/Exception.php @@ -4,7 +4,9 @@ /** * Phalcon\Http\Cookie\Exception + * * Exceptions thrown in Phalcon\Http\Cookie will use this class + * */ class Exception extends \Phalcon\Exception { diff --git a/ide/stubs/Phalcon/http/request/Exception.php b/ide/stubs/Phalcon/http/request/Exception.php index f77b2c6b9..d923f8949 100644 --- a/ide/stubs/Phalcon/http/request/Exception.php +++ b/ide/stubs/Phalcon/http/request/Exception.php @@ -4,7 +4,9 @@ /** * Phalcon\Http\Request\Exception + * * Exceptions thrown in Phalcon\Http\Request will use this class + * */ class Exception extends \Phalcon\Exception { diff --git a/ide/stubs/Phalcon/http/request/File.php b/ide/stubs/Phalcon/http/request/File.php index 597785e48..a240945e7 100644 --- a/ide/stubs/Phalcon/http/request/File.php +++ b/ide/stubs/Phalcon/http/request/File.php @@ -4,21 +4,24 @@ /** * Phalcon\Http\Request\File + * * Provides OO wrappers to the $_FILES superglobal + * * * use Phalcon\Mvc\Controller; + * * class PostsController extends Controller * { - * public function uploadAction() - * { - * // Check if the user has uploaded files - * if ($this->request->hasFiles() == true) { - * // Print the real file names and their sizes - * foreach ($this->request->getUploadedFiles() as $file) { - * echo $file->getName(), " ", $file->getSize(), "\n"; - * } - * } - * } + * public function uploadAction() + * { + * // Check if the user has uploaded files + * if ($this->request->hasFiles() == true) { + * // Print the real file names and their sizes + * foreach ($this->request->getUploadedFiles() as $file) { + * echo $file->getName(), " ", $file->getSize(), "\n"; + * } + * } + * } * } * */ @@ -56,46 +59,46 @@ class File implements \Phalcon\Http\Request\FileInterface /** - * @return string|null + * @return string|null */ public function getError() {} /** - * @return string|null + * @return string|null */ public function getKey() {} /** - * @return string + * @return string */ public function getExtension() {} /** * Phalcon\Http\Request\File constructor * - * @param array $file - * @param mixed $key + * @param array $file + * @param mixed $key */ public function __construct(array $file, $key = null) {} /** * Returns the file size of the uploaded file * - * @return int + * @return int */ public function getSize() {} /** * Returns the real name of the uploaded file * - * @return string + * @return string */ public function getName() {} /** * Returns the temporary name of the uploaded file * - * @return string + * @return string */ public function getTempName() {} @@ -103,29 +106,29 @@ public function getTempName() {} * Returns the mime type reported by the browser * This mime type is not completely secure, use getRealType() instead * - * @return string + * @return string */ public function getType() {} /** * Gets the real mime type of the upload file using finfo * - * @return string + * @return string */ public function getRealType() {} /** * Checks whether the file has been uploaded via Post. * - * @return bool + * @return bool */ public function isUploadedFile() {} /** * Moves the temporary file to a destination within the application * - * @param string $destination - * @return bool + * @param string $destination + * @return bool */ public function moveTo($destination) {} diff --git a/ide/stubs/Phalcon/http/request/FileInterface.php b/ide/stubs/Phalcon/http/request/FileInterface.php index 1f13c5bec..608f42ad7 100644 --- a/ide/stubs/Phalcon/http/request/FileInterface.php +++ b/ide/stubs/Phalcon/http/request/FileInterface.php @@ -4,7 +4,9 @@ /** * Phalcon\Http\Request\FileInterface + * * Interface for Phalcon\Http\Request\File + * */ interface FileInterface { @@ -12,21 +14,21 @@ interface FileInterface /** * Returns the file size of the uploaded file * - * @return int + * @return int */ public function getSize(); /** * Returns the real name of the uploaded file * - * @return string + * @return string */ public function getName(); /** * Returns the temporal name of the uploaded file * - * @return string + * @return string */ public function getTempName(); @@ -34,22 +36,22 @@ public function getTempName(); * Returns the mime type reported by the browser * This mime type is not completely secure, use getRealType() instead * - * @return string + * @return string */ public function getType(); /** * Gets the real mime type of the upload file using finfo * - * @return string + * @return string */ public function getRealType(); /** * Move the temporary file to a destination * - * @param string $destination - * @return bool + * @param string $destination + * @return bool */ public function moveTo($destination); diff --git a/ide/stubs/Phalcon/http/response/Cookies.php b/ide/stubs/Phalcon/http/response/Cookies.php index f75d6110d..808c6cb3d 100644 --- a/ide/stubs/Phalcon/http/response/Cookies.php +++ b/ide/stubs/Phalcon/http/response/Cookies.php @@ -4,6 +4,7 @@ /** * Phalcon\Http\Response\Cookies + * * This class is a bag to manage the cookies * A cookies bag is automatically registered as part of the 'response' service in the DI */ @@ -25,29 +26,29 @@ class Cookies implements \Phalcon\Http\Response\CookiesInterface, \Phalcon\Di\In /** * Sets the dependency injector * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the internal dependency injector * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI() {} /** * Set if cookies in the bag must be automatically encrypted/decrypted * - * @param bool $useEncryption - * @return Cookies + * @param bool $useEncryption + * @return Cookies */ public function useEncryption($useEncryption) {} /** * Returns if the bag is automatically encrypting/decrypting cookies * - * @return bool + * @return bool */ public function isUsingEncryption() {} @@ -55,30 +56,30 @@ public function isUsingEncryption() {} * Sets a cookie to be sent at the end of the request * This method overrides any cookie set before with the same name * - * @param string $name - * @param mixed $value - * @param int $expire - * @param string $path - * @param bool $secure - * @param string $domain - * @param bool $httpOnly - * @return Cookies + * @param string $name + * @param mixed $value + * @param int $expire + * @param string $path + * @param bool $secure + * @param string $domain + * @param bool $httpOnly + * @return Cookies */ public function set($name, $value = null, $expire = 0, $path = "/", $secure = null, $domain = null, $httpOnly = null) {} /** * Gets a cookie from the bag * - * @param string $name - * @return \Phalcon\Http\CookieInterface + * @param string $name + * @return \Phalcon\Http\CookieInterface */ public function get($name) {} /** * Check if a cookie is defined in the bag or exists in the _COOKIE superglobal * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function has($name) {} @@ -86,8 +87,8 @@ public function has($name) {} * Deletes a cookie by its name * This method does not removes cookies from the _COOKIE superglobal * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function delete($name) {} @@ -95,14 +96,14 @@ public function delete($name) {} * Sends the cookies to the client * Cookies aren't sent if headers are sent in the current request * - * @return bool + * @return bool */ public function send() {} /** * Reset set cookies * - * @return Cookies + * @return Cookies */ public function reset() {} diff --git a/ide/stubs/Phalcon/http/response/CookiesInterface.php b/ide/stubs/Phalcon/http/response/CookiesInterface.php index a7743371a..7cf46c81a 100644 --- a/ide/stubs/Phalcon/http/response/CookiesInterface.php +++ b/ide/stubs/Phalcon/http/response/CookiesInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Http\Response\CookiesInterface + * * Interface for Phalcon\Http\Response\Cookies */ interface CookiesInterface @@ -12,45 +13,45 @@ interface CookiesInterface /** * Set if cookies in the bag must be automatically encrypted/decrypted * - * @param bool $useEncryption - * @return CookiesInterface + * @param bool $useEncryption + * @return CookiesInterface */ public function useEncryption($useEncryption); /** * Returns if the bag is automatically encrypting/decrypting cookies * - * @return bool + * @return bool */ public function isUsingEncryption(); /** * Sets a cookie to be sent at the end of the request * - * @param string $name - * @param mixed $value - * @param int $expire - * @param string $path - * @param bool $secure - * @param string $domain - * @param bool $httpOnly - * @return CookiesInterface + * @param string $name + * @param mixed $value + * @param int $expire + * @param string $path + * @param bool $secure + * @param string $domain + * @param bool $httpOnly + * @return CookiesInterface */ public function set($name, $value = null, $expire = 0, $path = "/", $secure = null, $domain = null, $httpOnly = null); /** * Gets a cookie from the bag * - * @param string $name - * @return \Phalcon\Http\Cookie + * @param string $name + * @return \Phalcon\Http\Cookie */ public function get($name); /** * Check if a cookie is defined in the bag or exists in the _COOKIE superglobal * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function has($name); @@ -58,22 +59,22 @@ public function has($name); * Deletes a cookie by its name * This method does not removes cookies from the _COOKIE superglobal * - * @param string $name - * @return bool + * @param string $name + * @return bool */ public function delete($name); /** * Sends the cookies to the client * - * @return bool + * @return bool */ public function send(); /** * Reset set cookies * - * @return CookiesInterface + * @return CookiesInterface */ public function reset(); diff --git a/ide/stubs/Phalcon/http/response/Exception.php b/ide/stubs/Phalcon/http/response/Exception.php index 85e629c69..77ebdffae 100644 --- a/ide/stubs/Phalcon/http/response/Exception.php +++ b/ide/stubs/Phalcon/http/response/Exception.php @@ -4,7 +4,9 @@ /** * Phalcon\Http\Response\Exception + * * Exceptions thrown in Phalcon\Http\Response will use this class + * */ class Exception extends \Phalcon\Exception { diff --git a/ide/stubs/Phalcon/http/response/Headers.php b/ide/stubs/Phalcon/http/response/Headers.php index 6cf24e1f1..08f343a4b 100644 --- a/ide/stubs/Phalcon/http/response/Headers.php +++ b/ide/stubs/Phalcon/http/response/Headers.php @@ -4,6 +4,7 @@ /** * Phalcon\Http\Response\Headers + * * This class is a bag to manage the response headers */ class Headers implements \Phalcon\Http\Response\HeadersInterface @@ -15,37 +16,37 @@ class Headers implements \Phalcon\Http\Response\HeadersInterface /** * Sets a header to be sent at the end of the request * - * @param string $name - * @param string $value + * @param string $name + * @param string $value */ public function set($name, $value) {} /** * Gets a header value from the internal bag * - * @param string $name - * @return string|bool + * @param string $name + * @return string|bool */ public function get($name) {} /** * Sets a raw header to be sent at the end of the request * - * @param string $header + * @param string $header */ public function setRaw($header) {} /** * Removes a header to be sent at the end of the request * - * @param string $header + * @param string $header */ public function remove($header) {} /** * Sends the headers to the client * - * @return bool + * @return bool */ public function send() {} @@ -57,15 +58,15 @@ public function reset() {} /** * Returns the current headers as an array * - * @return array + * @return array */ public function toArray() {} /** * Restore a \Phalcon\Http\Response\Headers object * - * @param array $data - * @return Headers + * @param array $data + * @return Headers */ public static function __set_state(array $data) {} diff --git a/ide/stubs/Phalcon/http/response/HeadersInterface.php b/ide/stubs/Phalcon/http/response/HeadersInterface.php index 42f5cad65..9d7349ea2 100644 --- a/ide/stubs/Phalcon/http/response/HeadersInterface.php +++ b/ide/stubs/Phalcon/http/response/HeadersInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Http\Response\HeadersInterface + * * Interface for Phalcon\Http\Response\Headers compatible bags */ interface HeadersInterface @@ -12,30 +13,30 @@ interface HeadersInterface /** * Sets a header to be sent at the end of the request * - * @param string $name - * @param string $value + * @param string $name + * @param string $value */ public function set($name, $value); /** * Gets a header value from the internal bag * - * @param string $name - * @return string|bool + * @param string $name + * @return string|bool */ public function get($name); /** * Sets a raw header to be sent at the end of the request * - * @param string $header + * @param string $header */ public function setRaw($header); /** * Sends the headers to the client * - * @return bool + * @return bool */ public function send(); @@ -47,8 +48,8 @@ public function reset(); /** * Restore a \Phalcon\Http\Response\Headers object * - * @param array $data - * @return HeadersInterface + * @param array $data + * @return HeadersInterface */ public static function __set_state(array $data); diff --git a/ide/stubs/Phalcon/image/Adapter.php b/ide/stubs/Phalcon/image/Adapter.php index 656e6861d..e947ab2c9 100644 --- a/ide/stubs/Phalcon/image/Adapter.php +++ b/ide/stubs/Phalcon/image/Adapter.php @@ -4,6 +4,7 @@ /** * Phalcon\Image\Adapter + * * All image adapters must use this class */ abstract class Adapter implements \Phalcon\Image\AdapterInterface @@ -20,6 +21,7 @@ abstract class Adapter implements \Phalcon\Image\AdapterInterface /** * Image width * + * * @var int */ protected $_width; @@ -27,14 +29,17 @@ abstract class Adapter implements \Phalcon\Image\AdapterInterface /** * Image height * + * * @var int */ protected $_height; /** * Image type + * * Driver dependent * + * * @var int */ protected $_type; @@ -42,6 +47,7 @@ abstract class Adapter implements \Phalcon\Image\AdapterInterface /** * Image mime type * + * * @var string */ protected $_mime; @@ -59,175 +65,178 @@ public function getRealpath() {} /** * Image width * - * @return int + * @return int */ public function getWidth() {} /** * Image height * - * @return int + * @return int */ public function getHeight() {} /** * Image type + * * Driver dependent * - * @return int + * + * @return int */ public function getType() {} /** * Image mime type * - * @return string + * @return string */ public function getMime() {} /** * Resize the image to the given size * - * @param int $width - * @param int $height - * @param int $master - * @return Adapter + * @param int $width + * @param int $height + * @param int $master + * @return Adapter */ public function resize($width = null, $height = null, $master = Image::AUTO) {} /** * This method scales the images using liquid rescaling method. Only support Imagick * - * @param int $width - * @param int $height - * @param int $deltaX - * @param int $rigidity + * + * @param int $width + * @param int $height + * @param int $deltaX + * @param int $rigidity * @param int $$width new width * @param int $$height new height * @param int $$deltaX How much the seam can traverse on x-axis. Passing 0 causes the seams to be straight. * @param int $$rigidity Introduces a bias for non-straight seams. This parameter is typically 0. - * @return Adapter + * @return Adapter */ public function liquidRescale($width, $height, $deltaX = 0, $rigidity = 0) {} /** * Crop an image to the given size * - * @param int $width - * @param int $height - * @param int $offsetX - * @param int $offsetY - * @return Adapter + * @param int $width + * @param int $height + * @param int $offsetX + * @param int $offsetY + * @return Adapter */ public function crop($width, $height, $offsetX = null, $offsetY = null) {} /** * Rotate the image by a given amount * - * @param int $degrees - * @return Adapter + * @param int $degrees + * @return Adapter */ public function rotate($degrees) {} /** * Flip the image along the horizontal or vertical axis * - * @param int $direction - * @return Adapter + * @param int $direction + * @return Adapter */ public function flip($direction) {} /** * Sharpen the image by a given amount * - * @param int $amount - * @return Adapter + * @param int $amount + * @return Adapter */ public function sharpen($amount) {} /** * Add a reflection to an image * - * @param int $height - * @param int $opacity - * @param bool $fadeIn - * @return Adapter + * @param int $height + * @param int $opacity + * @param bool $fadeIn + * @return Adapter */ public function reflection($height, $opacity = 100, $fadeIn = false) {} /** * Add a watermark to an image with the specified opacity * - * @param mixed $watermark - * @param int $offsetX - * @param int $offsetY - * @param int $opacity - * @return Adapter + * @param Adapter $watermark + * @param int $offsetX + * @param int $offsetY + * @param int $opacity + * @return Adapter */ public function watermark(Adapter $watermark, $offsetX = 0, $offsetY = 0, $opacity = 100) {} /** * Add a text to an image with a specified opacity * - * @param string $text - * @param mixed $offsetX - * @param mixed $offsetY - * @param int $opacity - * @param string $color - * @param int $size - * @param string $fontfile - * @return Adapter + * @param string $text + * @param mixed $offsetX + * @param mixed $offsetY + * @param int $opacity + * @param string $color + * @param int $size + * @param string $fontfile + * @return Adapter */ public function text($text, $offsetX = false, $offsetY = false, $opacity = 100, $color = "000000", $size = 12, $fontfile = null) {} /** * Composite one image onto another * - * @param mixed $watermark - * @return Adapter + * @param Adapter $watermark + * @return Adapter */ public function mask(Adapter $watermark) {} /** * Set the background color of an image * - * @param string $color - * @param int $opacity - * @return Adapter + * @param string $color + * @param int $opacity + * @return Adapter */ public function background($color, $opacity = 100) {} /** * Blur image * - * @param int $radius - * @return Adapter + * @param int $radius + * @return Adapter */ public function blur($radius) {} /** * Pixelate image * - * @param int $amount - * @return Adapter + * @param int $amount + * @return Adapter */ public function pixelate($amount) {} /** * Save the image * - * @param string $file - * @param int $quality - * @return Adapter + * @param string $file + * @param int $quality + * @return Adapter */ public function save($file = null, $quality = -1) {} /** * Render the image and return the binary string * - * @param string $ext - * @param int $quality - * @return string + * @param string $ext + * @param int $quality + * @return string */ public function render($ext = null, $quality = 100) {} diff --git a/ide/stubs/Phalcon/image/AdapterInterface.php b/ide/stubs/Phalcon/image/AdapterInterface.php index 4e50fba55..bd3428060 100644 --- a/ide/stubs/Phalcon/image/AdapterInterface.php +++ b/ide/stubs/Phalcon/image/AdapterInterface.php @@ -7,91 +7,91 @@ interface AdapterInterface { /** - * @param int $width - * @param int $height - * @param int $master + * @param int $width + * @param int $height + * @param int $master */ public function resize($width = null, $height = null, $master = Image::AUTO); /** - * @param int $width - * @param int $height - * @param int $offsetX - * @param int $offsetY + * @param int $width + * @param int $height + * @param int $offsetX + * @param int $offsetY */ public function crop($width, $height, $offsetX = null, $offsetY = null); /** - * @param int $degrees + * @param int $degrees */ public function rotate($degrees); /** - * @param int $direction + * @param int $direction */ public function flip($direction); /** - * @param int $amount + * @param int $amount */ public function sharpen($amount); /** - * @param int $height - * @param int $opacity - * @param bool $fadeIn + * @param int $height + * @param int $opacity + * @param bool $fadeIn */ public function reflection($height, $opacity = 100, $fadeIn = false); /** - * @param mixed $watermark - * @param int $offsetX - * @param int $offsetY - * @param int $opacity + * @param Adapter $watermark + * @param int $offsetX + * @param int $offsetY + * @param int $opacity */ public function watermark(Adapter $watermark, $offsetX = 0, $offsetY = 0, $opacity = 100); /** - * @param string $text - * @param int $offsetX - * @param int $offsetY - * @param int $opacity - * @param string $color - * @param int $size - * @param string $fontfile + * @param string $text + * @param int $offsetX + * @param int $offsetY + * @param int $opacity + * @param string $color + * @param int $size + * @param string $fontfile */ public function text($text, $offsetX = 0, $offsetY = 0, $opacity = 100, $color = "000000", $size = 12, $fontfile = null); /** - * @param mixed $watermark + * @param Adapter $watermark */ public function mask(Adapter $watermark); /** - * @param string $color - * @param int $opacity + * @param string $color + * @param int $opacity */ public function background($color, $opacity = 100); /** - * @param int $radius + * @param int $radius */ public function blur($radius); /** - * @param int $amount + * @param int $amount */ public function pixelate($amount); /** - * @param string $file - * @param int $quality + * @param string $file + * @param int $quality */ public function save($file = null, $quality = 100); /** - * @param string $ext - * @param int $quality + * @param string $ext + * @param int $quality */ public function render($ext = null, $quality = 100); diff --git a/ide/stubs/Phalcon/image/adapter/Gd.php b/ide/stubs/Phalcon/image/adapter/Gd.php index c30d9ddff..c162e8a31 100644 --- a/ide/stubs/Phalcon/image/adapter/Gd.php +++ b/ide/stubs/Phalcon/image/adapter/Gd.php @@ -10,112 +10,112 @@ class Gd extends \Phalcon\Image\Adapter /** - * @return bool + * @return bool */ public static function check() {} /** - * @param string $file - * @param int $width - * @param int $height + * @param string $file + * @param int $width + * @param int $height */ public function __construct($file, $width = null, $height = null) {} /** - * @param int $width - * @param int $height + * @param int $width + * @param int $height */ protected function _resize($width, $height) {} /** - * @param int $width - * @param int $height - * @param int $offsetX - * @param int $offsetY + * @param int $width + * @param int $height + * @param int $offsetX + * @param int $offsetY */ protected function _crop($width, $height, $offsetX, $offsetY) {} /** - * @param int $degrees + * @param int $degrees */ protected function _rotate($degrees) {} /** - * @param int $direction + * @param int $direction */ protected function _flip($direction) {} /** - * @param int $amount + * @param int $amount */ protected function _sharpen($amount) {} /** - * @param int $height - * @param int $opacity - * @param bool $fadeIn + * @param int $height + * @param int $opacity + * @param bool $fadeIn */ protected function _reflection($height, $opacity, $fadeIn) {} /** - * @param mixed $watermark - * @param int $offsetX - * @param int $offsetY - * @param int $opacity + * @param \Phalcon\Image\Adapter $watermark + * @param int $offsetX + * @param int $offsetY + * @param int $opacity */ protected function _watermark(\Phalcon\Image\Adapter $watermark, $offsetX, $offsetY, $opacity) {} /** - * @param string $text - * @param int $offsetX - * @param int $offsetY - * @param int $opacity - * @param int $r - * @param int $g - * @param int $b - * @param int $size - * @param string $fontfile + * @param string $text + * @param int $offsetX + * @param int $offsetY + * @param int $opacity + * @param int $r + * @param int $g + * @param int $b + * @param int $size + * @param string $fontfile */ protected function _text($text, $offsetX, $offsetY, $opacity, $r, $g, $b, $size, $fontfile) {} /** - * @param mixed $mask + * @param \Phalcon\Image\Adapter $mask */ protected function _mask(\Phalcon\Image\Adapter $mask) {} /** - * @param int $r - * @param int $g - * @param int $b - * @param int $opacity + * @param int $r + * @param int $g + * @param int $b + * @param int $opacity */ protected function _background($r, $g, $b, $opacity) {} /** - * @param int $radius + * @param int $radius */ protected function _blur($radius) {} /** - * @param int $amount + * @param int $amount */ protected function _pixelate($amount) {} /** - * @param string $file - * @param int $quality + * @param string $file + * @param int $quality */ protected function _save($file, $quality) {} /** - * @param string $ext - * @param int $quality + * @param string $ext + * @param int $quality */ protected function _render($ext, $quality) {} /** - * @param int $width - * @param int $height + * @param int $width + * @param int $height */ protected function _create($width, $height) {} diff --git a/ide/stubs/Phalcon/image/adapter/Imagick.php b/ide/stubs/Phalcon/image/adapter/Imagick.php index edc008a2b..10faa7bab 100644 --- a/ide/stubs/Phalcon/image/adapter/Imagick.php +++ b/ide/stubs/Phalcon/image/adapter/Imagick.php @@ -4,12 +4,16 @@ /** * Phalcon\Image\Adapter\Imagick + * * Image manipulation support. Allows images to be resized, cropped, etc. + * * * $image = new \Phalcon\Image\Adapter\Imagick("upload/test.jpg"); + * * $image->resize(200, 200)->rotate(90)->crop(100, 100); + * * if ($image->save()) { - * echo "success"; + * echo "success"; * } * */ @@ -25,34 +29,35 @@ class Imagick extends \Phalcon\Image\Adapter /** * Checks if Imagick is enabled * - * @return bool + * @return bool */ public static function check() {} /** * \Phalcon\Image\Adapter\Imagick constructor * - * @param string $file - * @param int $width - * @param int $height + * @param string $file + * @param int $width + * @param int $height */ public function __construct($file, $width = null, $height = null) {} /** * Execute a resize. * - * @param int $width - * @param int $height + * @param int $width + * @param int $height */ protected function _resize($width, $height) {} /** * This method scales the images using liquid rescaling method. Only support Imagick * - * @param int $width - * @param int $height - * @param int $deltaX - * @param int $rigidity + * + * @param int $width + * @param int $height + * @param int $deltaX + * @param int $rigidity * @param int $$width new width * @param int $$height new height * @param int $$deltaX How much the seam can traverse on x-axis. Passing 0 causes the seams to be straight. @@ -63,89 +68,90 @@ protected function _liquidRescale($width, $height, $deltaX, $rigidity) {} /** * Execute a crop. * - * @param int $width - * @param int $height - * @param int $offsetX - * @param int $offsetY + * @param int $width + * @param int $height + * @param int $offsetX + * @param int $offsetY */ protected function _crop($width, $height, $offsetX, $offsetY) {} /** * Execute a rotation. * - * @param int $degrees + * @param int $degrees */ protected function _rotate($degrees) {} /** * Execute a flip. * - * @param int $direction + * @param int $direction */ protected function _flip($direction) {} /** * Execute a sharpen. * - * @param int $amount + * @param int $amount */ protected function _sharpen($amount) {} /** * Execute a reflection. * - * @param int $height - * @param int $opacity - * @param bool $fadeIn + * @param int $height + * @param int $opacity + * @param bool $fadeIn */ protected function _reflection($height, $opacity, $fadeIn) {} /** * Execute a watermarking. * - * @param mixed $image - * @param int $offsetX - * @param int $offsetY - * @param int $opacity + * @param \Phalcon\Image\Adapter $image + * @param int $offsetX + * @param int $offsetY + * @param int $opacity */ protected function _watermark(\Phalcon\Image\Adapter $image, $offsetX, $offsetY, $opacity) {} /** * Execute a text * - * @param string $text - * @param mixed $offsetX - * @param mixed $offsetY - * @param int $opacity - * @param int $r - * @param int $g - * @param int $b - * @param int $size - * @param string $fontfile + * @param string $text + * @param mixed $offsetX + * @param mixed $offsetY + * @param int $opacity + * @param int $r + * @param int $g + * @param int $b + * @param int $size + * @param string $fontfile */ protected function _text($text, $offsetX, $offsetY, $opacity, $r, $g, $b, $size, $fontfile) {} /** * Composite one image onto another * - * @param mixed $image + * @param \Phalcon\Image\Adapter $image */ protected function _mask(\Phalcon\Image\Adapter $image) {} /** * Execute a background. * - * @param int $r - * @param int $g - * @param int $b - * @param int $opacity + * @param int $r + * @param int $g + * @param int $b + * @param int $opacity */ protected function _background($r, $g, $b, $opacity) {} /** * Blur image * - * @param int $radius + * + * @param int $radius * @param int $$radius Blur radius */ protected function _blur($radius) {} @@ -153,7 +159,8 @@ protected function _blur($radius) {} /** * Pixelate image * - * @param int $amount + * + * @param int $amount * @param int $$amount amount to pixelate */ protected function _pixelate($amount) {} @@ -161,17 +168,17 @@ protected function _pixelate($amount) {} /** * Execute a save. * - * @param string $file - * @param int $quality + * @param string $file + * @param int $quality */ protected function _save($file, $quality) {} /** * Execute a render. * - * @param string $extension - * @param int $quality - * @return string + * @param string $extension + * @param int $quality + * @return string */ protected function _render($extension, $quality) {} @@ -183,16 +190,17 @@ public function __destruct() {} /** * Get instance * - * @return \Imagick + * @return \Imagick */ public function getInternalImInstance() {} /** * Sets the limit for a particular resource in megabytes * + * * @link http://php.net/manual/ru/imagick.constants.php#imagick.constants.resourcetypes - * @param int $type - * @param int $limit + * @param int $type + * @param int $limit */ public function setResourceLimit($type, $limit) {} diff --git a/ide/stubs/Phalcon/loader/Exception.php b/ide/stubs/Phalcon/loader/Exception.php index 0732e2934..6423fbb0a 100644 --- a/ide/stubs/Phalcon/loader/Exception.php +++ b/ide/stubs/Phalcon/loader/Exception.php @@ -4,7 +4,9 @@ /** * Phalcon\Loader\Exception + * * Exceptions thrown in Phalcon\Loader will use this class + * */ class Exception extends \Phalcon\Exception { diff --git a/ide/stubs/Phalcon/logger/Adapter.php b/ide/stubs/Phalcon/logger/Adapter.php index b077d7b67..faf41a39f 100644 --- a/ide/stubs/Phalcon/logger/Adapter.php +++ b/ide/stubs/Phalcon/logger/Adapter.php @@ -4,6 +4,7 @@ /** * Phalcon\Logger\Adapter + * * Base class for Phalcon\Logger adapters */ abstract class Adapter implements \Phalcon\Logger\AdapterInterface @@ -11,6 +12,7 @@ abstract class Adapter implements \Phalcon\Logger\AdapterInterface /** * Tells if there is an active transaction or not * + * * @var boolean */ protected $_transaction = false; @@ -18,6 +20,7 @@ abstract class Adapter implements \Phalcon\Logger\AdapterInterface /** * Array with messages queued in the transaction * + * * @var array */ protected $_queue = array(); @@ -25,6 +28,7 @@ abstract class Adapter implements \Phalcon\Logger\AdapterInterface /** * Formatter * + * * @var object */ protected $_formatter; @@ -32,6 +36,7 @@ abstract class Adapter implements \Phalcon\Logger\AdapterInterface /** * Log level * + * * @var int */ protected $_logLevel = 9; @@ -40,133 +45,133 @@ abstract class Adapter implements \Phalcon\Logger\AdapterInterface /** * Filters the logs sent to the handlers that are less or equal than a specific level * - * @param int $level - * @return \Phalcon\Logger\AdapterInterface + * @param int $level + * @return \Phalcon\Logger\AdapterInterface */ public function setLogLevel($level) {} /** * Returns the current log level * - * @return int + * @return int */ public function getLogLevel() {} /** * Sets the message formatter * - * @param mixed $formatter - * @return \Phalcon\Logger\AdapterInterface + * @param \Phalcon\Logger\FormatterInterface $formatter + * @return \Phalcon\Logger\AdapterInterface */ public function setFormatter(\Phalcon\Logger\FormatterInterface $formatter) {} /** * Starts a transaction * - * @return \Phalcon\Logger\AdapterInterface + * @return \Phalcon\Logger\AdapterInterface */ public function begin() {} /** * Commits the internal transaction * - * @return \Phalcon\Logger\AdapterInterface + * @return \Phalcon\Logger\AdapterInterface */ public function commit() {} /** * Rollbacks the internal transaction * - * @return \Phalcon\Logger\AdapterInterface + * @return \Phalcon\Logger\AdapterInterface */ public function rollback() {} /** * Returns the whether the logger is currently in an active transaction or not * - * @return bool + * @return bool */ public function isTransaction() {} /** * Sends/Writes a critical message to the log * - * @param string $message - * @param array $context - * @return \Phalcon\Logger\AdapterInterface + * @param string $message + * @param array $context + * @return \Phalcon\Logger\AdapterInterface */ public function critical($message, array $context = null) {} /** * Sends/Writes an emergency message to the log * - * @param string $message - * @param array $context - * @return \Phalcon\Logger\AdapterInterface + * @param string $message + * @param array $context + * @return \Phalcon\Logger\AdapterInterface */ public function emergency($message, array $context = null) {} /** * Sends/Writes a debug message to the log * - * @param string $message - * @param array $context - * @return \Phalcon\Logger\AdapterInterface + * @param string $message + * @param array $context + * @return \Phalcon\Logger\AdapterInterface */ public function debug($message, array $context = null) {} /** * Sends/Writes an error message to the log * - * @param string $message - * @param array $context - * @return \Phalcon\Logger\AdapterInterface + * @param string $message + * @param array $context + * @return \Phalcon\Logger\AdapterInterface */ public function error($message, array $context = null) {} /** * Sends/Writes an info message to the log * - * @param string $message - * @param array $context - * @return \Phalcon\Logger\AdapterInterface + * @param string $message + * @param array $context + * @return \Phalcon\Logger\AdapterInterface */ public function info($message, array $context = null) {} /** * Sends/Writes a notice message to the log * - * @param string $message - * @param array $context - * @return \Phalcon\Logger\AdapterInterface + * @param string $message + * @param array $context + * @return \Phalcon\Logger\AdapterInterface */ public function notice($message, array $context = null) {} /** * Sends/Writes a warning message to the log * - * @param string $message - * @param array $context - * @return \Phalcon\Logger\AdapterInterface + * @param string $message + * @param array $context + * @return \Phalcon\Logger\AdapterInterface */ public function warning($message, array $context = null) {} /** * Sends/Writes an alert message to the log * - * @param string $message - * @param array $context - * @return \Phalcon\Logger\AdapterInterface + * @param string $message + * @param array $context + * @return \Phalcon\Logger\AdapterInterface */ public function alert($message, array $context = null) {} /** * Logs messages to the internal logger. Appends logs to the logger * - * @param mixed $type - * @param mixed $message - * @param array $context - * @return \Phalcon\Logger\AdapterInterface + * @param mixed $type + * @param mixed $message + * @param array $context + * @return \Phalcon\Logger\AdapterInterface */ public function log($type, $message = null, array $context = null) {} diff --git a/ide/stubs/Phalcon/logger/AdapterInterface.php b/ide/stubs/Phalcon/logger/AdapterInterface.php index 309f4aca3..a6ed7ba9b 100644 --- a/ide/stubs/Phalcon/logger/AdapterInterface.php +++ b/ide/stubs/Phalcon/logger/AdapterInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Logger\AdapterInterface + * * Interface for Phalcon\Logger adapters */ interface AdapterInterface @@ -12,131 +13,131 @@ interface AdapterInterface /** * Sets the message formatter * - * @param mixed $formatter - * @return AdapterInterface + * @param FormatterInterface $formatter + * @return AdapterInterface */ public function setFormatter(FormatterInterface $formatter); /** * Returns the internal formatter * - * @return FormatterInterface + * @return FormatterInterface */ public function getFormatter(); /** * Filters the logs sent to the handlers to be greater or equals than a specific level * - * @param int $level - * @return AdapterInterface + * @param int $level + * @return AdapterInterface */ public function setLogLevel($level); /** * Returns the current log level * - * @return int + * @return int */ public function getLogLevel(); /** * Sends/Writes messages to the file log * - * @param mixed $type - * @param mixed $message - * @param array $context - * @return AdapterInterface + * @param mixed $type + * @param mixed $message + * @param array $context + * @return AdapterInterface */ public function log($type, $message = null, array $context = null); /** * Starts a transaction * - * @return AdapterInterface + * @return AdapterInterface */ public function begin(); /** * Commits the internal transaction * - * @return AdapterInterface + * @return AdapterInterface */ public function commit(); /** * Rollbacks the internal transaction * - * @return AdapterInterface + * @return AdapterInterface */ public function rollback(); /** * Closes the logger * - * @return bool + * @return bool */ public function close(); /** * Sends/Writes a debug message to the log * - * @param string $message - * @param array $context - * @return AdapterInterface + * @param string $message + * @param array $context + * @return AdapterInterface */ public function debug($message, array $context = null); /** * Sends/Writes an error message to the log * - * @param string $message - * @param array $context - * @return AdapterInterface + * @param string $message + * @param array $context + * @return AdapterInterface */ public function error($message, array $context = null); /** * Sends/Writes an info message to the log * - * @param string $message - * @param array $context - * @return AdapterInterface + * @param string $message + * @param array $context + * @return AdapterInterface */ public function info($message, array $context = null); /** * Sends/Writes a notice message to the log * - * @param string $message - * @param array $context - * @return AdapterInterface + * @param string $message + * @param array $context + * @return AdapterInterface */ public function notice($message, array $context = null); /** * Sends/Writes a warning message to the log * - * @param string $message - * @param array $context - * @return AdapterInterface + * @param string $message + * @param array $context + * @return AdapterInterface */ public function warning($message, array $context = null); /** * Sends/Writes an alert message to the log * - * @param string $message - * @param array $context - * @return AdapterInterface + * @param string $message + * @param array $context + * @return AdapterInterface */ public function alert($message, array $context = null); /** * Sends/Writes an emergency message to the log * - * @param string $message - * @param array $context - * @return AdapterInterface + * @param string $message + * @param array $context + * @return AdapterInterface */ public function emergency($message, array $context = null); diff --git a/ide/stubs/Phalcon/logger/Exception.php b/ide/stubs/Phalcon/logger/Exception.php index 4784a7f42..8569a5a32 100644 --- a/ide/stubs/Phalcon/logger/Exception.php +++ b/ide/stubs/Phalcon/logger/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Logger\Exception + * * Exceptions thrown in Phalcon\Logger will use this class */ class Exception extends \Phalcon\Exception diff --git a/ide/stubs/Phalcon/logger/Formatter.php b/ide/stubs/Phalcon/logger/Formatter.php index c6239e93c..567d2e317 100644 --- a/ide/stubs/Phalcon/logger/Formatter.php +++ b/ide/stubs/Phalcon/logger/Formatter.php @@ -4,6 +4,7 @@ /** * Phalcon\Logger\Formatter + * * This is a base class for logger formatters */ abstract class Formatter implements \Phalcon\Logger\FormatterInterface @@ -12,19 +13,20 @@ abstract class Formatter implements \Phalcon\Logger\FormatterInterface /** * Returns the string meaning of a logger constant * - * @param int $type - * @return string + * @param int $type + * @return string */ public function getTypeString($type) {} /** * Interpolates context values into the message placeholders * + * * @see http://www.php-fig.org/psr/psr-3/ Section 1.2 Message - * @param string $message - * @param mixed $context - * @param string $$message - * @param array $$context + * @param string $message + * @param mixed $context + * @param string $$message + * @param array $$context */ public function interpolate($message, $context = null) {} diff --git a/ide/stubs/Phalcon/logger/FormatterInterface.php b/ide/stubs/Phalcon/logger/FormatterInterface.php index ec3369fa4..aca7ee9c9 100644 --- a/ide/stubs/Phalcon/logger/FormatterInterface.php +++ b/ide/stubs/Phalcon/logger/FormatterInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Logger\FormatterInterface + * * This interface must be implemented by formatters in Phalcon\Logger */ interface FormatterInterface @@ -12,12 +13,13 @@ interface FormatterInterface /** * Applies a format to a message before sent it to the internal log * - * @param string $message - * @param int $type - * @param int $timestamp - * @param mixed $context - * @param array $$context - * @return string|array + * + * @param string $message + * @param int $type + * @param int $timestamp + * @param mixed $context + * @param array $$context + * @return string|array */ public function format($message, $type, $timestamp, $context = null); diff --git a/ide/stubs/Phalcon/logger/Item.php b/ide/stubs/Phalcon/logger/Item.php index 209d3602a..605114486 100644 --- a/ide/stubs/Phalcon/logger/Item.php +++ b/ide/stubs/Phalcon/logger/Item.php @@ -4,13 +4,16 @@ /** * Phalcon\Logger\Item + * * Represents each item in a logging transaction + * */ class Item { /** * Log type * + * * @var integer */ protected $_type; @@ -18,6 +21,7 @@ class Item /** * Log message * + * * @var string */ protected $_message; @@ -25,6 +29,7 @@ class Item /** * Log timestamp * + * * @var integer */ protected $_time; @@ -36,21 +41,21 @@ class Item /** * Log type * - * @return integer + * @return integer */ public function getType() {} /** * Log message * - * @return string + * @return string */ public function getMessage() {} /** * Log timestamp * - * @return integer + * @return integer */ public function getTime() {} @@ -60,14 +65,15 @@ public function getContext() {} /** * Phalcon\Logger\Item constructor * - * @param string $message - * @param int $type - * @param int $time - * @param mixed $context - * @param string $$message - * @param integer $$type - * @param integer $$time - * @param array $$context + * + * @param string $message + * @param int $type + * @param int $time + * @param mixed $context + * @param string $$message + * @param integer $$type + * @param integer $$time + * @param array $$context */ public function __construct($message, $type, $time = 0, $context = null) {} diff --git a/ide/stubs/Phalcon/logger/Multiple.php b/ide/stubs/Phalcon/logger/Multiple.php index b9d0905ff..7fd54e39c 100644 --- a/ide/stubs/Phalcon/logger/Multiple.php +++ b/ide/stubs/Phalcon/logger/Multiple.php @@ -4,6 +4,7 @@ /** * Phalcon\Logger\Multiple + * * Handles multiples logger handlers */ class Multiple @@ -30,94 +31,94 @@ public function getLogLevel() {} /** * Pushes a logger to the logger tail * - * @param mixed $logger + * @param \Phalcon\Logger\AdapterInterface $logger */ public function push(\Phalcon\Logger\AdapterInterface $logger) {} /** * Sets a global formatter * - * @param mixed $formatter + * @param \Phalcon\Logger\FormatterInterface $formatter */ public function setFormatter(\Phalcon\Logger\FormatterInterface $formatter) {} /** * Sets a global level * - * @param int $level + * @param int $level */ public function setLogLevel($level) {} /** * Sends a message to each registered logger * - * @param mixed $type - * @param mixed $message - * @param array $context + * @param mixed $type + * @param mixed $message + * @param array $context */ public function log($type, $message = null, array $context = null) {} /** * Sends/Writes an critical message to the log * - * @param string $message - * @param array $context + * @param string $message + * @param array $context */ public function critical($message, array $context = null) {} /** * Sends/Writes an emergency message to the log * - * @param string $message - * @param array $context + * @param string $message + * @param array $context */ public function emergency($message, array $context = null) {} /** * Sends/Writes a debug message to the log * - * @param string $message - * @param array $context + * @param string $message + * @param array $context */ public function debug($message, array $context = null) {} /** * Sends/Writes an error message to the log * - * @param string $message - * @param array $context + * @param string $message + * @param array $context */ public function error($message, array $context = null) {} /** * Sends/Writes an info message to the log * - * @param string $message - * @param array $context + * @param string $message + * @param array $context */ public function info($message, array $context = null) {} /** * Sends/Writes a notice message to the log * - * @param string $message - * @param array $context + * @param string $message + * @param array $context */ public function notice($message, array $context = null) {} /** * Sends/Writes a warning message to the log * - * @param string $message - * @param array $context + * @param string $message + * @param array $context */ public function warning($message, array $context = null) {} /** * Sends/Writes an alert message to the log * - * @param string $message - * @param array $context + * @param string $message + * @param array $context */ public function alert($message, array $context = null) {} diff --git a/ide/stubs/Phalcon/logger/adapter/File.php b/ide/stubs/Phalcon/logger/adapter/File.php index efe97b115..ad7ea68dc 100644 --- a/ide/stubs/Phalcon/logger/adapter/File.php +++ b/ide/stubs/Phalcon/logger/adapter/File.php @@ -4,12 +4,16 @@ /** * Phalcon\Logger\Adapter\File + * * Adapter to store logs in plain text files + * * * $logger = new \Phalcon\Logger\Adapter\File("app/logs/test.log"); + * * $logger->log("This is a message"); * $logger->log(\Phalcon\Logger::ERROR, "This is an error"); * $logger->error("This is another error"); + * * $logger->close(); * */ @@ -18,6 +22,7 @@ class File extends \Phalcon\Logger\Adapter /** * File handler resource * + * * @var resource */ protected $_fileHandler; @@ -41,32 +46,33 @@ public function getPath() {} /** * Phalcon\Logger\Adapter\File constructor * - * @param string $name - * @param array $options + * + * @param string $name + * @param array $options */ public function __construct($name, $options = null) {} /** * Returns the internal formatter * - * @return \Phalcon\Logger\FormatterInterface + * @return \Phalcon\Logger\FormatterInterface */ public function getFormatter() {} /** * Writes the log to the file itself * - * @param string $message - * @param int $type - * @param int $time - * @param array $context + * @param string $message + * @param int $type + * @param int $time + * @param array $context */ public function logInternal($message, $type, $time, array $context) {} /** * Closes the logger * - * @return bool + * @return bool */ public function close() {} diff --git a/ide/stubs/Phalcon/logger/adapter/Firephp.php b/ide/stubs/Phalcon/logger/adapter/Firephp.php index 3c9164deb..eb0d7b698 100644 --- a/ide/stubs/Phalcon/logger/adapter/Firephp.php +++ b/ide/stubs/Phalcon/logger/adapter/Firephp.php @@ -4,11 +4,15 @@ /** * Phalcon\Logger\Adapter\Firephp + * * Sends logs to FirePHP + * * * use Phalcon\Logger\Adapter\Firephp; * use Phalcon\Logger; + * * $logger = new Firephp(); + * * $logger->log(Logger::ERROR, "This is an error"); * $logger->error("This is another error"); * @@ -25,24 +29,24 @@ class Firephp extends \Phalcon\Logger\Adapter /** * Returns the internal formatter * - * @return \Phalcon\Logger\FormatterInterface + * @return \Phalcon\Logger\FormatterInterface */ public function getFormatter() {} /** * Writes the log to the stream itself * - * @param string $message - * @param int $type - * @param int $time - * @param array $context + * @param string $message + * @param int $type + * @param int $time + * @param array $context */ public function logInternal($message, $type, $time, array $context) {} /** * Closes the logger * - * @return bool + * @return bool */ public function close() {} diff --git a/ide/stubs/Phalcon/logger/adapter/Stream.php b/ide/stubs/Phalcon/logger/adapter/Stream.php index 8d934ffee..fc5451790 100644 --- a/ide/stubs/Phalcon/logger/adapter/Stream.php +++ b/ide/stubs/Phalcon/logger/adapter/Stream.php @@ -4,11 +4,15 @@ /** * Phalcon\Logger\Adapter\Stream + * * Sends logs to a valid PHP stream + * * * use Phalcon\Logger; * use Phalcon\Logger\Adapter\Stream; + * * $logger = new Stream("php://stderr"); + * * $logger->log("This is a message"); * $logger->log(Logger::ERROR, "This is an error"); * $logger->error("This is another error"); @@ -19,6 +23,7 @@ class Stream extends \Phalcon\Logger\Adapter /** * File handler resource * + * * @var resource */ protected $_stream; @@ -27,32 +32,33 @@ class Stream extends \Phalcon\Logger\Adapter /** * Phalcon\Logger\Adapter\Stream constructor * - * @param string $name - * @param array $options + * + * @param string $name + * @param array $options */ public function __construct($name, $options = null) {} /** * Returns the internal formatter * - * @return \Phalcon\Logger\FormatterInterface + * @return \Phalcon\Logger\FormatterInterface */ public function getFormatter() {} /** * Writes the log to the stream itself * - * @param string $message - * @param int $type - * @param int $time - * @param array $context + * @param string $message + * @param int $type + * @param int $time + * @param array $context */ public function logInternal($message, $type, $time, array $context) {} /** * Closes the logger * - * @return bool + * @return bool */ public function close() {} diff --git a/ide/stubs/Phalcon/logger/adapter/Syslog.php b/ide/stubs/Phalcon/logger/adapter/Syslog.php index bc6bacb4a..5c1f5f0e2 100644 --- a/ide/stubs/Phalcon/logger/adapter/Syslog.php +++ b/ide/stubs/Phalcon/logger/adapter/Syslog.php @@ -4,18 +4,22 @@ /** * Phalcon\Logger\Adapter\Syslog + * * Sends logs to the system logger + * * * use Phalcon\Logger; * use Phalcon\Logger\Adapter\Syslog; + * * // LOG_USER is the only valid log type under Windows operating systems * $logger = new Syslog( - * "ident", - * [ - * "option" => LOG_CONS | LOG_NDELAY | LOG_PID, - * "facility" => LOG_USER, - * ] + * "ident", + * [ + * "option" => LOG_CONS | LOG_NDELAY | LOG_PID, + * "facility" => LOG_USER, + * ] * ); + * * $logger->log("This is a message"); * $logger->log(Logger::ERROR, "This is an error"); * $logger->error("This is another error"); @@ -30,32 +34,33 @@ class Syslog extends \Phalcon\Logger\Adapter /** * Phalcon\Logger\Adapter\Syslog constructor * - * @param string $name - * @param array $options + * + * @param string $name + * @param array $options */ public function __construct($name, $options = null) {} /** * Returns the internal formatter * - * @return \Phalcon\Logger\Formatter\Syslog + * @return \Phalcon\Logger\Formatter\Syslog */ public function getFormatter() {} /** * Writes the log to the stream itself * - * @param string $message - * @param int $type - * @param int $time - * @param array $context + * @param string $message + * @param int $type + * @param int $time + * @param array $context */ public function logInternal($message, $type, $time, array $context) {} /** * Closes the logger * - * @return bool + * @return bool */ public function close() {} diff --git a/ide/stubs/Phalcon/logger/formatter/Firephp.php b/ide/stubs/Phalcon/logger/formatter/Firephp.php index d6a2de29e..b5936f930 100644 --- a/ide/stubs/Phalcon/logger/formatter/Firephp.php +++ b/ide/stubs/Phalcon/logger/formatter/Firephp.php @@ -4,6 +4,7 @@ /** * Phalcon\Logger\Formatter\Firephp + * * Formats messages so that they can be sent to FirePHP */ class Firephp extends \Phalcon\Logger\Formatter @@ -18,53 +19,55 @@ class Firephp extends \Phalcon\Logger\Formatter /** * Returns the string meaning of a logger constant * - * @param int $type - * @return string + * @param int $type + * @return string */ public function getTypeString($type) {} /** * Returns the string meaning of a logger constant * - * @param bool $isShow - * @return Firephp + * @param bool $isShow + * @return Firephp */ public function setShowBacktrace($isShow = null) {} /** * Returns the string meaning of a logger constant * - * @return bool + * @return bool */ public function getShowBacktrace() {} /** * Returns the string meaning of a logger constant * - * @param bool $isEnable - * @return Firephp + * @param bool $isEnable + * @return Firephp */ public function enableLabels($isEnable = null) {} /** * Returns the labels enabled * - * @return bool + * @return bool */ public function labelsEnabled() {} /** * Applies a format to a message before sending it to the log * - * @param string $message - * @param int $type - * @param int $timestamp - * @param mixed $context - * @param string $$message - * @param int $$type - * @param int $$timestamp - * @param array $$context - * @return string + * + * @param array $context + * + * @param string $message + * @param int $type + * @param int $timestamp + * @param mixed $context + * @param string $$message + * @param int $$type + * @param int $$timestamp + * @return string */ public function format($message, $type, $timestamp, $context = null) {} diff --git a/ide/stubs/Phalcon/logger/formatter/Json.php b/ide/stubs/Phalcon/logger/formatter/Json.php index 159a493ea..c07052f70 100644 --- a/ide/stubs/Phalcon/logger/formatter/Json.php +++ b/ide/stubs/Phalcon/logger/formatter/Json.php @@ -4,6 +4,7 @@ /** * Phalcon\Logger\Formatter\Json + * * Formats messages using JSON encoding */ class Json extends \Phalcon\Logger\Formatter @@ -12,12 +13,13 @@ class Json extends \Phalcon\Logger\Formatter /** * Applies a format to a message before sent it to the internal log * - * @param string $message - * @param int $type - * @param int $timestamp - * @param mixed $context - * @param array $$context - * @return string + * + * @param string $message + * @param int $type + * @param int $timestamp + * @param mixed $context + * @param array $$context + * @return string */ public function format($message, $type, $timestamp, $context = null) {} diff --git a/ide/stubs/Phalcon/logger/formatter/Line.php b/ide/stubs/Phalcon/logger/formatter/Line.php index ef91039b6..b0933bb5a 100644 --- a/ide/stubs/Phalcon/logger/formatter/Line.php +++ b/ide/stubs/Phalcon/logger/formatter/Line.php @@ -4,6 +4,7 @@ /** * Phalcon\Logger\Formatter\Line + * * Formats messages using an one-line string */ class Line extends \Phalcon\Logger\Formatter @@ -11,6 +12,7 @@ class Line extends \Phalcon\Logger\Formatter /** * Default date format * + * * @var string */ protected $_dateFormat = "D, d M y H:i:s O"; @@ -18,6 +20,7 @@ class Line extends \Phalcon\Logger\Formatter /** * Format applied to each message * + * * @var string */ protected $_format = "[%date%][%type%] %message%"; @@ -26,48 +29,50 @@ class Line extends \Phalcon\Logger\Formatter /** * Default date format * - * @return string + * @return string */ public function getDateFormat() {} /** * Default date format * - * @param string $dateFormat + * @param string $dateFormat */ public function setDateFormat($dateFormat) {} /** * Format applied to each message * - * @return string + * @return string */ public function getFormat() {} /** * Format applied to each message * - * @param string $format + * @param string $format */ public function setFormat($format) {} /** * Phalcon\Logger\Formatter\Line construct * - * @param string $format - * @param string $dateFormat + * + * @param string $format + * @param string $dateFormat */ public function __construct($format = null, $dateFormat = null) {} /** * Applies a format to a message before sent it to the internal log * - * @param string $message - * @param int $type - * @param int $timestamp - * @param mixed $context - * @param array $$context - * @return string + * + * @param string $message + * @param int $type + * @param int $timestamp + * @param mixed $context + * @param array $$context + * @return string */ public function format($message, $type, $timestamp, $context = null) {} diff --git a/ide/stubs/Phalcon/logger/formatter/Syslog.php b/ide/stubs/Phalcon/logger/formatter/Syslog.php index 083bb3b8a..093e4697b 100644 --- a/ide/stubs/Phalcon/logger/formatter/Syslog.php +++ b/ide/stubs/Phalcon/logger/formatter/Syslog.php @@ -4,6 +4,7 @@ /** * Phalcon\Logger\Formatter\Syslog + * * Prepares a message to be used in a Syslog backend */ class Syslog extends \Phalcon\Logger\Formatter @@ -12,11 +13,12 @@ class Syslog extends \Phalcon\Logger\Formatter /** * Applies a format to a message before sent it to the internal log * - * @param string $message - * @param int $type - * @param int $timestamp - * @param array $context - * @return array + * + * @param string $message + * @param int $type + * @param int $timestamp + * @param array $context + * @return array */ public function format($message, $type, $timestamp, $context = null) {} diff --git a/ide/stubs/Phalcon/mvc/Application.php b/ide/stubs/Phalcon/mvc/Application.php index 9c446bf7d..9ec95679a 100644 --- a/ide/stubs/Phalcon/mvc/Application.php +++ b/ide/stubs/Phalcon/mvc/Application.php @@ -4,39 +4,46 @@ /** * Phalcon\Mvc\Application + * * This component encapsulates all the complex operations behind instantiating every component * needed and integrating it with the rest to allow the MVC pattern to operate as desired. + * * * use Phalcon\Mvc\Application; + * * class MyApp extends Application * { - * / + * / * Register the services here to make them general or register * in the ModuleDefinition to make them module-specific * \/ - * protected function registerServices() - * { - * } - * / + * protected function registerServices() + * { + * + * } + * + * / * This method registers all the modules in the application * \/ - * public function main() - * { - * $this->registerModules( - * [ - * "frontend" => [ - * "className" => "Multiple\\Frontend\\Module", - * "path" => "../apps/frontend/Module.php", - * ], - * "backend" => [ - * "className" => "Multiple\\Backend\\Module", - * "path" => "../apps/backend/Module.php", - * ], - * ] - * ); - * } + * public function main() + * { + * $this->registerModules( + * [ + * "frontend" => [ + * "className" => "Multiple\\Frontend\\Module", + * "path" => "../apps/frontend/Module.php", + * ], + * "backend" => [ + * "className" => "Multiple\\Backend\\Module", + * "path" => "../apps/backend/Module.php", + * ], + * ] + * ); + * } * } + * * $application = new MyApp(); + * * $application->main(); * */ @@ -50,16 +57,16 @@ class Application extends \Phalcon\Application * By default. The view is implicitly buffering all the output * You can full disable the view component using this method * - * @param bool $implicitView - * @return Application + * @param bool $implicitView + * @return Application */ public function useImplicitView($implicitView) {} /** * Handles a MVC request * - * @param string $uri - * @return bool|\Phalcon\Http\ResponseInterface + * @param string $uri + * @return bool|\Phalcon\Http\ResponseInterface */ public function handle($uri = null) {} diff --git a/ide/stubs/Phalcon/mvc/Collection.php b/ide/stubs/Phalcon/mvc/Collection.php index 5e6826b73..d9ac4a664 100644 --- a/ide/stubs/Phalcon/mvc/Collection.php +++ b/ide/stubs/Phalcon/mvc/Collection.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Collection + * * This component implements a high level abstraction for NoSQL databases which * works with documents */ @@ -55,310 +56,335 @@ abstract class Collection implements \Phalcon\Mvc\EntityInterface, \Phalcon\Mvc\ /** * Phalcon\Mvc\Collection constructor * - * @param mixed $dependencyInjector - * @param mixed $modelsManager + * @param \Phalcon\DiInterface $dependencyInjector + * @param \Phalcon\Mvc\Collection\ManagerInterface $modelsManager */ public final function __construct(\Phalcon\DiInterface $dependencyInjector = null, \Phalcon\Mvc\Collection\ManagerInterface $modelsManager = null) {} /** * Sets a value for the _id property, creates a MongoId object if needed * - * @param mixed $id + * + * @param mixed $id */ public function setId($id) {} /** * Returns the value of the _id property * - * @return \MongoId + * + * @return \MongoId */ public function getId() {} /** * Sets the dependency injection container * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the dependency injection container * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI() {} /** * Sets a custom events manager * - * @param mixed $eventsManager + * @param \Phalcon\Mvc\Collection\ManagerInterface $eventsManager */ protected function setEventsManager(\Phalcon\Mvc\Collection\ManagerInterface $eventsManager) {} /** * Returns the custom events manager * - * @return \Phalcon\Mvc\Collection\ManagerInterface + * @return \Phalcon\Mvc\Collection\ManagerInterface */ protected function getEventsManager() {} /** * Returns the models manager related to the entity instance * - * @return \Phalcon\Mvc\Collection\ManagerInterface + * @return \Phalcon\Mvc\Collection\ManagerInterface */ public function getCollectionManager() {} /** * Returns an array with reserved properties that cannot be part of the insert/update * - * @return array + * @return array */ public function getReservedAttributes() {} /** * Sets if a model must use implicit objects ids * - * @param bool $useImplicitObjectIds + * @param bool $useImplicitObjectIds */ protected function useImplicitObjectIds($useImplicitObjectIds) {} /** * Sets collection name which model should be mapped * - * @param string $source - * @return Collection + * @param string $source + * @return Collection */ protected function setSource($source) {} /** * Returns collection name mapped in the model * - * @return string + * @return string */ public function getSource() {} /** * Sets the DependencyInjection connection service name * - * @param string $connectionService - * @return Collection + * @param string $connectionService + * @return Collection */ public function setConnectionService($connectionService) {} /** * Returns DependencyInjection connection service * - * @return string + * @return string */ public function getConnectionService() {} /** * Retrieves a database connection * - * @return \MongoDb + * + * @return \MongoDb */ public function getConnection() {} /** * Reads an attribute value by its name + * * * echo $robot->readAttribute("name"); * * - * @param string $attribute - * @return mixed + * + * @param string $attribute + * @return mixed */ public function readAttribute($attribute) {} /** * Writes an attribute value by its name + * * * $robot->writeAttribute("name", "Rosey"); * * - * @param string $attribute - * @param mixed $value + * + * @param string $attribute + * @param mixed $value */ public function writeAttribute($attribute, $value) {} /** * Returns a cloned collection * - * @param mixed $collection - * @param array $document - * @return CollectionInterface + * @param CollectionInterface $collection + * @param array $document + * @return CollectionInterface */ public static function cloneResult(CollectionInterface $collection, array $document) {} /** * Returns a collection resultset * - * @param array $params - * @param \Phalcon\Mvc\Collection $collection - * @param \MongoDb $connection - * @param boolean $unique - * @return array + * + * @param array $params + * @param \Phalcon\Mvc\Collection $collection + * @param \MongoDb $connection + * @param boolean $unique + * @return array */ protected static function _getResultset($params, CollectionInterface $collection, $connection, $unique) {} /** * Perform a count over a resultset * - * @param array $params - * @param \Phalcon\Mvc\Collection $collection - * @param \MongoDb $connection - * @return int + * + * @param array $params + * @param \Phalcon\Mvc\Collection $collection + * @param \MongoDb $connection + * @return int */ protected static function _getGroupResultset($params, Collection $collection, $connection) {} /** * Executes internal hooks before save a document * - * @param \Phalcon\DiInterface $dependencyInjector - * @param boolean $disableEvents - * @param boolean $exists - * @return boolean + * + * @param \Phalcon\DiInterface $dependencyInjector + * @param boolean $disableEvents + * @param boolean $exists + * @return bool */ protected final function _preSave($dependencyInjector, $disableEvents, $exists) {} /** * Executes internal events after save a document * - * @param bool $disableEvents - * @param bool $success - * @param bool $exists - * @return bool + * @param bool $disableEvents + * @param bool $success + * @param bool $exists + * @return bool */ protected final function _postSave($disableEvents, $success, $exists) {} /** * Executes validators on every validation call + * * * use Phalcon\Mvc\Model\Validator\ExclusionIn as ExclusionIn; + * * class Subscriptors extends \Phalcon\Mvc\Collection * { - * public function validation() - * { - * $this->validate( - * new ExclusionIn( - * [ - * "field" => "status", - * "domain" => ["A", "I"], - * ] - * ) - * ); - * if ($this->validationHasFailed() == true) { - * return false; - * } - * } + * public function validation() + * { + * $this->validate( + * new ExclusionIn( + * [ + * "field" => "status", + * "domain" => ["A", "I"], + * ] + * ) + * ); + * + * if ($this->validationHasFailed() == true) { + * return false; + * } + * } * } * * - * @param mixed $validator + * @param Model\ValidatorInterface $validator */ protected function validate(Model\ValidatorInterface $validator) {} /** * Check whether validation process has generated any messages + * * * use Phalcon\Mvc\Model\Validator\ExclusionIn as ExclusionIn; + * * class Subscriptors extends \Phalcon\Mvc\Collection * { - * public function validation() - * { - * $this->validate( - * new ExclusionIn( - * [ - * "field" => "status", - * "domain" => ["A", "I"], - * ] - * ) - * ); - * if ($this->validationHasFailed() == true) { - * return false; - * } - * } + * public function validation() + * { + * $this->validate( + * new ExclusionIn( + * [ + * "field" => "status", + * "domain" => ["A", "I"], + * ] + * ) + * ); + * + * if ($this->validationHasFailed() == true) { + * return false; + * } + * } * } * * - * @return bool + * @return bool */ public function validationHasFailed() {} /** * Fires an internal event * - * @param string $eventName - * @return bool + * @param string $eventName + * @return bool */ public function fireEvent($eventName) {} /** * Fires an internal event that cancels the operation * - * @param string $eventName - * @return bool + * @param string $eventName + * @return bool */ public function fireEventCancel($eventName) {} /** * Cancel the current operation * - * @param bool $disableEvents - * @return bool + * @param bool $disableEvents + * @return bool */ protected function _cancelOperation($disableEvents) {} /** * Checks if the document exists in the collection * - * @param \MongoCollection $collection - * @return boolean + * + * @param \MongoCollection $collection + * @return bool */ protected function _exists($collection) {} /** * Returns all the validation messages + * * * $robot = new Robots(); + * * $robot->type = "mechanical"; * $robot->name = "Astro Boy"; * $robot->year = 1952; + * * if ($robot->save() === false) { - * echo "Umh, We can't store robots right now "; - * $messages = $robot->getMessages(); - * foreach ($messages as $message) { - * echo $message; - * } + * echo "Umh, We can't store robots right now "; + * + * $messages = $robot->getMessages(); + * + * foreach ($messages as $message) { + * echo $message; + * } * } else { - * echo "Great, a new robot was saved successfully!"; + * echo "Great, a new robot was saved successfully!"; * } * * - * @return MessageInterface[] + * @return \Phalcon\Mvc\Model\MessageInterface[] */ public function getMessages() {} /** * Appends a customized message on the validation process + * * * use \Phalcon\Mvc\Model\Message as Message; + * * class Robots extends \Phalcon\Mvc\Model * { - * public function beforeSave() - * { - * if ($this->name === "Peter") { - * $message = new Message( - * "Sorry, but a robot cannot be named Peter" - * ); - * $this->appendMessage(message); - * } - * } + * public function beforeSave() + * { + * if ($this->name === "Peter") { + * $message = new Message( + * "Sorry, but a robot cannot be named Peter" + * ); + * + * $this->appendMessage(message); + * } + * } * } * * - * @param mixed $message + * @param \Phalcon\Mvc\Model\MessageInterface $message */ public function appendMessage(\Phalcon\Mvc\Model\MessageInterface $message) {} @@ -371,240 +397,268 @@ protected function prepareCU() {} /** * Creates/Updates a collection based on the values in the attributes * - * @return bool + * @return bool */ public function save() {} /** * Creates a collection based on the values in the attributes * - * @return bool + * @return bool */ public function create() {} /** * Creates a document based on the values in the attributes, if not found by criteria * Preferred way to avoid duplication is to create index on attribute + * * * $robot = new Robot(); + * * $robot->name = "MyRobot"; * $robot->type = "Droid"; + * * // Create only if robot with same name and type does not exist * $robot->createIfNotExist( - * [ - * "name", - * "type", - * ] + * [ + * "name", + * "type", + * ] * ); * * - * @param array $criteria - * @return bool + * @param array $criteria + * @return bool */ public function createIfNotExist(array $criteria) {} /** * Creates/Updates a collection based on the values in the attributes * - * @return bool + * @return bool */ public function update() {} /** * Find a document by its id (_id) + * * * // Find user by using \MongoId object * $user = Users::findById( - * new \MongoId("545eb081631d16153a293a66") + * new \MongoId("545eb081631d16153a293a66") * ); + * * // Find user by using id as sting * $user = Users::findById("45cbc4a0e4123f6920000002"); + * * // Validate input * if ($user = Users::findById($_POST["id"])) { - * // ... + * // ... * } * * - * @param mixed $id - * @return null|Collection + * @param mixed $id + * @return null|Collection */ public static function findById($id) {} /** * Allows to query the first record that match the specified conditions + * * * // What's the first robot in the robots table? * $robot = Robots::findFirst(); + * * echo "The robot name is ", $robot->name, "\n"; + * * // What's the first mechanical robot in robots table? * $robot = Robots::findFirst( - * [ - * [ - * "type" => "mechanical", - * ] - * ] + * [ + * [ + * "type" => "mechanical", + * ] + * ] * ); + * * echo "The first mechanical robot name is ", $robot->name, "\n"; + * * // Get first virtual robot ordered by name * $robot = Robots::findFirst( - * [ - * [ - * "type" => "mechanical", - * ], - * "order" => [ - * "name" => 1, - * ], - * ] + * [ + * [ + * "type" => "mechanical", + * ], + * "order" => [ + * "name" => 1, + * ], + * ] * ); + * * echo "The first virtual robot name is ", $robot->name, "\n"; + * * // Get first robot by id (_id) * $robot = Robots::findFirst( - * [ - * [ - * "_id" => new \MongoId("45cbc4a0e4123f6920000002"), - * ] - * ] + * [ + * [ + * "_id" => new \MongoId("45cbc4a0e4123f6920000002"), + * ] + * ] * ); + * * echo "The robot id is ", $robot->_id, "\n"; * * - * @param array $parameters - * @return array + * @param array $parameters + * @return array */ public static function findFirst(array $parameters = null) {} /** * Allows to query a set of records that match the specified conditions + * * * // How many robots are there? * $robots = Robots::find(); + * * echo "There are ", count($robots), "\n"; + * * // How many mechanical robots are there? * $robots = Robots::find( - * [ - * [ - * "type" => "mechanical", - * ] - * ] + * [ + * [ + * "type" => "mechanical", + * ] + * ] * ); + * * echo "There are ", count(robots), "\n"; + * * // Get and print virtual robots ordered by name * $robots = Robots::findFirst( - * [ - * [ - * "type" => "virtual" - * ], - * "order" => [ - * "name" => 1, - * ] - * ] + * [ + * [ + * "type" => "virtual" + * ], + * "order" => [ + * "name" => 1, + * ] + * ] * ); + * * foreach ($robots as $robot) { - * echo $robot->name, "\n"; + * echo $robot->name, "\n"; * } + * * // Get first 100 virtual robots ordered by name * $robots = Robots::find( - * [ - * [ - * "type" => "virtual", - * ], - * "order" => [ - * "name" => 1, - * ], - * "limit" => 100, - * ] + * [ + * [ + * "type" => "virtual", + * ], + * "order" => [ + * "name" => 1, + * ], + * "limit" => 100, + * ] * ); + * * foreach ($robots as $robot) { - * echo $robot->name, "\n"; + * echo $robot->name, "\n"; * } * * - * @param array $parameters - * @return array + * @param array $parameters + * @return array */ public static function find(array $parameters = null) {} /** * Perform a count over a collection + * * * echo "There are ", Robots::count(), " robots"; * * - * @param array $parameters - * @return array + * @param array $parameters + * @return array */ public static function count(array $parameters = null) {} /** * Perform an aggregation using the Mongo aggregation framework * - * @param array $parameters - * @return array + * @param array $parameters + * @return array */ public static function aggregate(array $parameters = null) {} /** * Allows to perform a summatory group for a column in the collection * - * @param string $field - * @param mixed $conditions - * @param mixed $finalize - * @return array + * @param string $field + * @param mixed $conditions + * @param mixed $finalize + * @return array */ public static function summatory($field, $conditions = null, $finalize = null) {} /** * Deletes a model instance. Returning true on success or false otherwise. + * * * $robot = Robots::findFirst(); + * * $robot->delete(); + * * $robots = Robots::find(); + * * foreach ($robots as $robot) { - * $robot->delete(); + * $robot->delete(); * } * * - * @return bool + * @return bool */ public function delete() {} /** * Sets up a behavior in a collection * - * @param mixed $behavior + * @param \Phalcon\Mvc\Collection\BehaviorInterface $behavior */ protected function addBehavior(\Phalcon\Mvc\Collection\BehaviorInterface $behavior) {} /** * Skips the current operation forcing a success state * - * @param bool $skip + * @param bool $skip */ public function skipOperation($skip) {} /** * Returns the instance as an array representation + * * * print_r( - * $robot->toArray() + * $robot->toArray() * ); * * - * @return array + * @return array */ public function toArray() {} /** * Serializes the object ignoring connections or protected properties * - * @return string + * @return string */ public function serialize() {} /** * Unserializes the object from a serialized string * - * @param string $data + * @param string $data */ public function unserialize($data) {} diff --git a/ide/stubs/Phalcon/mvc/CollectionInterface.php b/ide/stubs/Phalcon/mvc/CollectionInterface.php index 0993227ef..374348eb6 100644 --- a/ide/stubs/Phalcon/mvc/CollectionInterface.php +++ b/ide/stubs/Phalcon/mvc/CollectionInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\CollectionInterface + * * Interface for Phalcon\Mvc\Collection */ interface CollectionInterface @@ -12,59 +13,62 @@ interface CollectionInterface /** * Sets a value for the _id property, creates a MongoId object if needed * - * @param mixed $id + * + * @param mixed $id */ public function setId($id); /** * Returns the value of the _id property * - * @return MongoId + * + * @return MongoId */ public function getId(); /** * Returns an array with reserved properties that cannot be part of the insert/update * - * @return array + * @return array */ public function getReservedAttributes(); /** * Returns collection name mapped in the model * - * @return string + * @return string */ public function getSource(); /** * Sets a service in the services container that returns the Mongo database * - * @param string $connectionService + * @param string $connectionService */ public function setConnectionService($connectionService); /** * Retrieves a database connection * - * @return MongoDb + * + * @return MongoDb */ public function getConnection(); /** * Returns a cloned collection * - * @param mixed $collection - * @param array $document - * @return CollectionInterface + * @param CollectionInterface $collection + * @param array $document + * @return CollectionInterface */ public static function cloneResult(CollectionInterface $collection, array $document); /** * Fires an event, implicitly calls behaviors and listeners in the events manager are notified * - * @param string $eventName - * @return bool + * @param string $eventName + * @return bool */ public function fireEvent($eventName); @@ -72,76 +76,80 @@ public function fireEvent($eventName); * Fires an event, implicitly listeners in the events manager are notified * This method stops if one of the callbacks/listeners returns boolean false * - * @param string $eventName - * @return bool + * @param string $eventName + * @return bool */ public function fireEventCancel($eventName); /** * Check whether validation process has generated any messages * - * @return bool + * @return bool */ public function validationHasFailed(); /** * Returns all the validation messages * - * @return MessageInterface[] + * @return \Phalcon\Mvc\Model\MessageInterface[] */ public function getMessages(); /** * Appends a customized message on the validation process * - * @param mixed $message + * @param \Phalcon\Mvc\Model\MessageInterface $message */ public function appendMessage(\Phalcon\Mvc\Model\MessageInterface $message); /** * Creates/Updates a collection based on the values in the attributes * - * @return bool + * @return bool */ public function save(); /** * Find a document by its id * - * @param string $id - * @return \Phalcon\Mvc\Collection + * + * @param string $id + * @return CollectionInterface */ public static function findById($id); /** * Allows to query the first record that match the specified conditions * - * @param array $parameters - * @return array + * + * @param array $parameters + * @return array */ public static function findFirst(array $parameters = null); /** * Allows to query a set of records that match the specified conditions * - * @param array $parameters - * @param $array parameters - * @return array + * + * @param array $parameters + * @param $array parameters + * @return array */ public static function find(array $parameters = null); /** * Perform a count over a collection * - * @param array $parameters - * @return array + * + * @param array $parameters + * @return array */ public static function count(array $parameters = null); /** * Deletes a model instance. Returning true on success or false otherwise * - * @return bool + * @return bool */ public function delete(); diff --git a/ide/stubs/Phalcon/mvc/Controller.php b/ide/stubs/Phalcon/mvc/Controller.php index ee0ff4a71..f4089c53f 100644 --- a/ide/stubs/Phalcon/mvc/Controller.php +++ b/ide/stubs/Phalcon/mvc/Controller.php @@ -4,31 +4,39 @@ /** * Phalcon\Mvc\Controller + * * Every application controller should extend this class that encapsulates all the controller functionality + * * The controllers provide the “flow” between models and views. Controllers are responsible * for processing the incoming requests from the web browser, interrogating the models for data, * and passing that data on to the views for presentation. + * * * dispatcher->forward( - * [ - * "controller" => "people", - * "action" => "index", - * ] - * ); - * } + * // This action will be executed by default + * public function indexAction() + * { + * + * } + * + * public function findAction() + * { + * + * } + * + * public function saveAction() + * { + * // Forwards flow to the index action + * return $this->dispatcher->forward( + * [ + * "controller" => "people", + * "action" => "index", + * ] + * ); + * } * } * */ diff --git a/ide/stubs/Phalcon/mvc/ControllerInterface.php b/ide/stubs/Phalcon/mvc/ControllerInterface.php index a46083149..c4c458761 100644 --- a/ide/stubs/Phalcon/mvc/ControllerInterface.php +++ b/ide/stubs/Phalcon/mvc/ControllerInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\ControllerInterface + * * Interface for controller handlers */ interface ControllerInterface diff --git a/ide/stubs/Phalcon/mvc/Dispatcher.php b/ide/stubs/Phalcon/mvc/Dispatcher.php index 4c7613158..63da09ee8 100644 --- a/ide/stubs/Phalcon/mvc/Dispatcher.php +++ b/ide/stubs/Phalcon/mvc/Dispatcher.php @@ -4,16 +4,22 @@ /** * Phalcon\Mvc\Dispatcher + * * Dispatching is the process of taking the request object, extracting the module name, * controller name, action name, and optional parameters contained in it, and then * instantiating a controller and calling an action of that controller. + * * * $di = new \Phalcon\Di(); + * * $dispatcher = new \Phalcon\Mvc\Dispatcher(); + * * $dispatcher->setDI($di); + * * $dispatcher->setControllerName("posts"); * $dispatcher->setActionName("index"); * $dispatcher->setParams([]); + * * $controller = $dispatcher->dispatch(); * */ @@ -32,85 +38,85 @@ class Dispatcher extends \Phalcon\Dispatcher implements \Phalcon\Mvc\DispatcherI /** * Sets the default controller suffix * - * @param string $controllerSuffix + * @param string $controllerSuffix */ public function setControllerSuffix($controllerSuffix) {} /** * Sets the default controller name * - * @param string $controllerName + * @param string $controllerName */ public function setDefaultController($controllerName) {} /** * Sets the controller name to be dispatched * - * @param string $controllerName + * @param string $controllerName */ public function setControllerName($controllerName) {} /** * Gets last dispatched controller name * - * @return string + * @return string */ public function getControllerName() {} /** * Gets previous dispatched namespace name * - * @return string + * @return string */ public function getPreviousNamespaceName() {} /** * Gets previous dispatched controller name * - * @return string + * @return string */ public function getPreviousControllerName() {} /** * Gets previous dispatched action name * - * @return string + * @return string */ public function getPreviousActionName() {} /** * Throws an internal exception * - * @param string $message - * @param int $exceptionCode + * @param string $message + * @param int $exceptionCode */ protected function _throwDispatchException($message, $exceptionCode = 0) {} /** * Handles a user exception * - * @param mixed $exception + * @param \Exception $exception */ protected function _handleException(\Exception $exception) {} /** * Possible controller class name that will be located to dispatch the request * - * @return string + * @return string */ public function getControllerClass() {} /** * Returns the latest dispatched controller * - * @return \Phalcon\Mvc\ControllerInterface + * @return \Phalcon\Mvc\ControllerInterface */ public function getLastController() {} /** * Returns the active controller in the dispatcher * - * @return \Phalcon\Mvc\ControllerInterface + * @return \Phalcon\Mvc\ControllerInterface */ public function getActiveController() {} diff --git a/ide/stubs/Phalcon/mvc/DispatcherInterface.php b/ide/stubs/Phalcon/mvc/DispatcherInterface.php index 74d14c36c..d06250783 100644 --- a/ide/stubs/Phalcon/mvc/DispatcherInterface.php +++ b/ide/stubs/Phalcon/mvc/DispatcherInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\DispatcherInterface + * * Interface for Phalcon\Mvc\Dispatcher */ interface DispatcherInterface extends \Phalcon\DispatcherInterface @@ -12,42 +13,42 @@ interface DispatcherInterface extends \Phalcon\DispatcherInterface /** * Sets the default controller suffix * - * @param string $controllerSuffix + * @param string $controllerSuffix */ public function setControllerSuffix($controllerSuffix); /** * Sets the default controller name * - * @param string $controllerName + * @param string $controllerName */ public function setDefaultController($controllerName); /** * Sets the controller name to be dispatched * - * @param string $controllerName + * @param string $controllerName */ public function setControllerName($controllerName); /** * Gets last dispatched controller name * - * @return string + * @return string */ public function getControllerName(); /** * Returns the latest dispatched controller * - * @return \Phalcon\Mvc\ControllerInterface + * @return \Phalcon\Mvc\ControllerInterface */ public function getLastController(); /** * Returns the active controller in the dispatcher * - * @return \Phalcon\Mvc\ControllerInterface + * @return \Phalcon\Mvc\ControllerInterface */ public function getActiveController(); diff --git a/ide/stubs/Phalcon/mvc/EntityInterface.php b/ide/stubs/Phalcon/mvc/EntityInterface.php index df188b3bc..7dccffe42 100644 --- a/ide/stubs/Phalcon/mvc/EntityInterface.php +++ b/ide/stubs/Phalcon/mvc/EntityInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\EntityInterface + * * Interface for Phalcon\Mvc\Collection and Phalcon\Mvc\Model */ interface EntityInterface @@ -12,16 +13,18 @@ interface EntityInterface /** * Reads an attribute value by its name * - * @param string $attribute - * @return mixed + * + * @param string $attribute + * @return mixed */ public function readAttribute($attribute); /** * Writes an attribute value by its name * - * @param string $attribute - * @param mixed $value + * + * @param string $attribute + * @param mixed $value */ public function writeAttribute($attribute, $value); diff --git a/ide/stubs/Phalcon/mvc/Micro.php b/ide/stubs/Phalcon/mvc/Micro.php index 5bdc119e9..ea98a45a8 100644 --- a/ide/stubs/Phalcon/mvc/Micro.php +++ b/ide/stubs/Phalcon/mvc/Micro.php @@ -4,17 +4,21 @@ /** * Phalcon\Mvc\Micro + * * With Phalcon you can create "Micro-Framework like" applications. By doing this, you only need to * write a minimal amount of code to create a PHP application. Micro applications are suitable * to small applications, APIs and prototypes in a practical way. + * * * $app = new \Phalcon\Mvc\Micro(); + * * $app->get( - * "/say/welcome/{name}", - * function ($name) { - * echo "

Welcome $name!

"; - * } + * "/say/welcome/{name}", + * function ($name) { + * echo "

Welcome $name!

"; + * } * ); + * * $app->handle(); *
*/ @@ -57,163 +61,177 @@ class Micro extends \Phalcon\Di\Injectable implements \ArrayAccess /** * Phalcon\Mvc\Micro constructor * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function __construct(\Phalcon\DiInterface $dependencyInjector = null) {} /** * Sets the DependencyInjector container * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Maps a route to a handler without any HTTP method constraint * - * @param string $routePattern - * @param callable $handler - * @return \Phalcon\Mvc\Router\RouteInterface + * + * @param string $routePattern + * @param callable $handler + * @return \Phalcon\Mvc\Router\RouteInterface */ public function map($routePattern, $handler) {} /** * Maps a route to a handler that only matches if the HTTP method is GET * - * @param string $routePattern - * @param callable $handler - * @return \Phalcon\Mvc\Router\RouteInterface + * + * @param string $routePattern + * @param callable $handler + * @return \Phalcon\Mvc\Router\RouteInterface */ public function get($routePattern, $handler) {} /** * Maps a route to a handler that only matches if the HTTP method is POST * - * @param string $routePattern - * @param callable $handler - * @return \Phalcon\Mvc\Router\RouteInterface + * + * @param string $routePattern + * @param callable $handler + * @return \Phalcon\Mvc\Router\RouteInterface */ public function post($routePattern, $handler) {} /** * Maps a route to a handler that only matches if the HTTP method is PUT * - * @param string $routePattern - * @param mixed $handler - * @param string $$routePattern - * @param callable $$handler - * @return \Phalcon\Mvc\Router\RouteInterface + * + * @param string $routePattern + * @param mixed $handler + * @param string $$routePattern + * @param callable $$handler + * @return \Phalcon\Mvc\Router\RouteInterface */ public function put($routePattern, $handler) {} /** * Maps a route to a handler that only matches if the HTTP method is PATCH * - * @param string $routePattern - * @param mixed $handler - * @param string $$routePattern - * @param callable $$handler - * @return \Phalcon\Mvc\Router\RouteInterface + * + * @param string $routePattern + * @param mixed $handler + * @param string $$routePattern + * @param callable $$handler + * @return \Phalcon\Mvc\Router\RouteInterface */ public function patch($routePattern, $handler) {} /** * Maps a route to a handler that only matches if the HTTP method is HEAD * - * @param string $routePattern - * @param callable $handler - * @return \Phalcon\Mvc\Router\RouteInterface + * + * @param string $routePattern + * @param callable $handler + * @return \Phalcon\Mvc\Router\RouteInterface */ public function head($routePattern, $handler) {} /** * Maps a route to a handler that only matches if the HTTP method is DELETE * - * @param string $routePattern - * @param callable $handler - * @return \Phalcon\Mvc\Router\RouteInterface + * + * @param string $routePattern + * @param callable $handler + * @return \Phalcon\Mvc\Router\RouteInterface */ public function delete($routePattern, $handler) {} /** * Maps a route to a handler that only matches if the HTTP method is OPTIONS * - * @param string $routePattern - * @param callable $handler - * @return \Phalcon\Mvc\Router\RouteInterface + * + * @param string $routePattern + * @param callable $handler + * @return \Phalcon\Mvc\Router\RouteInterface */ public function options($routePattern, $handler) {} /** * Mounts a collection of handlers * - * @param mixed $collection - * @return Micro + * @param \Phalcon\Mvc\Micro\CollectionInterface $collection + * @return Micro */ public function mount(\Phalcon\Mvc\Micro\CollectionInterface $collection) {} /** * Sets a handler that will be called when the router doesn't match any of the defined routes * - * @param callable $handler - * @return \Phalcon\Mvc\Micro + * + * @param callable $handler + * @return Micro */ public function notFound($handler) {} /** * Sets a handler that will be called when an exception is thrown handling the route * - * @param callable $handler - * @return \Phalcon\Mvc\Micro + * + * @param callable $handler + * @return Micro */ public function error($handler) {} /** * Returns the internal router used by the application * - * @return RouterInterface + * @return RouterInterface */ public function getRouter() {} /** * Sets a service from the DI * - * @param string $serviceName - * @param mixed $definition - * @param boolean $shared - * @return \Phalcon\Di\ServiceInterface + * + * @param string $serviceName + * @param mixed $definition + * @param boolean $shared + * @return \Phalcon\Di\ServiceInterface */ public function setService($serviceName, $definition, $shared = false) {} /** * Checks if a service is registered in the DI * - * @param string $serviceName - * @return bool + * @param string $serviceName + * @return bool */ public function hasService($serviceName) {} /** * Obtains a service from the DI * - * @param string $serviceName - * @return object + * + * @param string $serviceName + * @return object */ public function getService($serviceName) {} /** * Obtains a shared service from the DI * - * @param string $serviceName - * @return mixed + * + * @param string $serviceName + * @return mixed */ public function getSharedService($serviceName) {} /** * Handle the whole request * - * @param string $uri - * @return mixed + * + * @param string $uri + * @return mixed */ public function handle($uri = null) {} @@ -225,91 +243,103 @@ public function stop() {} /** * Sets externally the handler that must be called by the matched route * - * @param callable $activeHandler + * + * @param callable $activeHandler */ public function setActiveHandler($activeHandler) {} /** * Return the handler that will be called for the matched route * - * @return callable + * + * @return callable */ public function getActiveHandler() {} /** * Returns the value returned by the executed handler * - * @return mixed + * + * @return mixed */ public function getReturnedValue() {} /** * Check if a service is registered in the internal services container using the array syntax * - * @param string $alias - * @return boolean + * + * @param string $alias + * @return bool */ public function offsetExists($alias) {} /** * Allows to register a shared service in the internal services container using the array syntax + * * * $app["request"] = new \Phalcon\Http\Request(); * * - * @param string $alias - * @param mixed $definition + * + * @param string $alias + * @param mixed $definition */ public function offsetSet($alias, $definition) {} /** * Allows to obtain a shared service in the internal services container using the array syntax + * * * var_dump( - * $app["request"] + * $app["request"] * ); * * - * @param string $alias - * @return mixed + * + * @param string $alias + * @return mixed */ public function offsetGet($alias) {} /** * Removes a service from the internal services container using the array syntax * - * @param string $alias + * + * @param string $alias */ public function offsetUnset($alias) {} /** * Appends a before middleware to be called before execute the route * - * @param callable $handler - * @return \Phalcon\Mvc\Micro + * + * @param callable $handler + * @return Micro */ public function before($handler) {} /** * Appends an 'after' middleware to be called after execute the route * - * @param callable $handler - * @return \Phalcon\Mvc\Micro + * + * @param callable $handler + * @return Micro */ public function after($handler) {} /** * Appends a 'finish' middleware to be called when the request is finished * - * @param callable $handler - * @return \Phalcon\Mvc\Micro + * + * @param callable $handler + * @return Micro */ public function finish($handler) {} /** * Returns the internal handlers attached to the application * - * @return array + * @return array */ public function getHandlers() {} diff --git a/ide/stubs/Phalcon/mvc/Model.php b/ide/stubs/Phalcon/mvc/Model.php index 59b4a2d8b..1283d4f9d 100644 --- a/ide/stubs/Phalcon/mvc/Model.php +++ b/ide/stubs/Phalcon/mvc/Model.php @@ -4,28 +4,36 @@ /** * Phalcon\Mvc\Model + * * Phalcon\Mvc\Model connects business objects and database tables to create * a persistable domain model where logic and data are presented in one wrapping. * It‘s an implementation of the object-relational mapping (ORM). + * * A model represents the information (data) of the application and the rules to manipulate that data. * Models are primarily used for managing the rules of interaction with a corresponding database table. * In most cases, each table in your database will correspond to one model in your application. * The bulk of your application's business logic will be concentrated in the models. + * * Phalcon\Mvc\Model is the first ORM written in Zephir/C languages for PHP, giving to developers high performance * when interacting with databases while is also easy to use. + * * * $robot = new Robots(); + * * $robot->type = "mechanical"; * $robot->name = "Astro Boy"; * $robot->year = 1952; + * * if ($robot->save() === false) { - * echo "Umh, We can store robots: "; - * $messages = $robot->getMessages(); - * foreach ($messages as $message) { - * echo message; - * } + * echo "Umh, We can store robots: "; + * + * $messages = $robot->getMessages(); + * + * foreach ($messages as $message) { + * echo message; + * } * } else { - * echo "Great, a new robot was saved successfully!"; + * echo "Great, a new robot was saved successfully!"; * } * */ @@ -95,488 +103,551 @@ abstract class Model implements \Phalcon\Mvc\EntityInterface, \Phalcon\Mvc\Model /** * Phalcon\Mvc\Model constructor * - * @param mixed $data - * @param mixed $dependencyInjector - * @param mixed $modelsManager + * @param mixed $data + * @param \Phalcon\DiInterface $dependencyInjector + * @param \Phalcon\Mvc\Model\ManagerInterface $modelsManager */ public final function __construct($data = null, \Phalcon\DiInterface $dependencyInjector = null, \Phalcon\Mvc\Model\ManagerInterface $modelsManager = null) {} /** * Sets the dependency injection container * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the dependency injection container * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI() {} /** * Sets a custom events manager * - * @param mixed $eventsManager + * @param \Phalcon\Events\ManagerInterface $eventsManager */ protected function setEventsManager(\Phalcon\Events\ManagerInterface $eventsManager) {} /** * Returns the custom events manager * - * @return \Phalcon\Events\ManagerInterface + * @return \Phalcon\Events\ManagerInterface */ protected function getEventsManager() {} /** * Returns the models meta-data service related to the entity instance * - * @return \Phalcon\Mvc\Model\MetaDataInterface + * @return \Phalcon\Mvc\Model\MetaDataInterface */ public function getModelsMetaData() {} /** * Returns the models manager related to the entity instance * - * @return \Phalcon\Mvc\Model\ManagerInterface + * @return \Phalcon\Mvc\Model\ManagerInterface */ public function getModelsManager() {} /** * Sets a transaction related to the Model instance + * * * use Phalcon\Mvc\Model\Transaction\Manager as TxManager; * use Phalcon\Mvc\Model\Transaction\Failed as TxFailed; + * * try { - * $txManager = new TxManager(); - * $transaction = $txManager->get(); - * $robot = new Robots(); - * $robot->setTransaction($transaction); - * $robot->name = "WALL·E"; - * $robot->created_at = date("Y-m-d"); - * if ($robot->save() === false) { - * $transaction->rollback("Can't save robot"); - * } - * $robotPart = new RobotParts(); - * $robotPart->setTransaction($transaction); - * $robotPart->type = "head"; - * if ($robotPart->save() === false) { - * $transaction->rollback("Robot part cannot be saved"); - * } - * $transaction->commit(); + * $txManager = new TxManager(); + * + * $transaction = $txManager->get(); + * + * $robot = new Robots(); + * + * $robot->setTransaction($transaction); + * + * $robot->name = "WALL·E"; + * $robot->created_at = date("Y-m-d"); + * + * if ($robot->save() === false) { + * $transaction->rollback("Can't save robot"); + * } + * + * $robotPart = new RobotParts(); + * + * $robotPart->setTransaction($transaction); + * + * $robotPart->type = "head"; + * + * if ($robotPart->save() === false) { + * $transaction->rollback("Robot part cannot be saved"); + * } + * + * $transaction->commit(); * } catch (TxFailed $e) { - * echo "Failed, reason: ", $e->getMessage(); + * echo "Failed, reason: ", $e->getMessage(); * } * * - * @param mixed $transaction - * @return Model + * @param \Phalcon\Mvc\Model\TransactionInterface $transaction + * @return Model */ public function setTransaction(\Phalcon\Mvc\Model\TransactionInterface $transaction) {} /** * Sets the table name to which model should be mapped * - * @param string $source - * @return Model + * @param string $source + * @return Model */ protected function setSource($source) {} /** * Returns the table name mapped in the model * - * @return string + * @return string */ public function getSource() {} /** * Sets schema name where the mapped table is located * - * @param string $schema - * @return Model + * @param string $schema + * @return Model */ protected function setSchema($schema) {} /** * Returns schema name where the mapped table is located * - * @return string + * @return string */ public function getSchema() {} /** * Sets the DependencyInjection connection service name * - * @param string $connectionService - * @return Model + * @param string $connectionService + * @return Model */ public function setConnectionService($connectionService) {} /** * Sets the DependencyInjection connection service name used to read data * - * @param string $connectionService - * @return Model + * @param string $connectionService + * @return Model */ public function setReadConnectionService($connectionService) {} /** * Sets the DependencyInjection connection service name used to write data * - * @param string $connectionService - * @return Model + * @param string $connectionService + * @return Model */ public function setWriteConnectionService($connectionService) {} /** * Returns the DependencyInjection connection service name used to read data related the model * - * @return string + * @return string */ public function getReadConnectionService() {} /** * Returns the DependencyInjection connection service name used to write data related to the model * - * @return string + * @return string */ public function getWriteConnectionService() {} /** - * Sets the dirty state of the object using one of the DIRTY_STATE_* constants + * Sets the dirty state of the object using one of the DIRTY_STATE_ constants * - * @param int $dirtyState - * @return ModelInterface + * @param int $dirtyState + * @return ModelInterface */ public function setDirtyState($dirtyState) {} /** - * Returns one of the DIRTY_STATE_* constants telling if the record exists in the database or not + * Returns one of the DIRTY_STATE_ constants telling if the record exists in the database or not * - * @return int + * @return int */ public function getDirtyState() {} /** * Gets the connection used to read data for the model * - * @return \Phalcon\Db\AdapterInterface + * @return \Phalcon\Db\AdapterInterface */ public function getReadConnection() {} /** * Gets the connection used to write data to the model * - * @return \Phalcon\Db\AdapterInterface + * @return \Phalcon\Db\AdapterInterface */ public function getWriteConnection() {} /** * Assigns values to a model from an array + * * * $robot->assign( - * [ - * "type" => "mechanical", - * "name" => "Astro Boy", - * "year" => 1952, - * ] + * [ + * "type" => "mechanical", + * "name" => "Astro Boy", + * "year" => 1952, + * ] * ); + * * // Assign by db row, column map needed * $robot->assign( - * $dbRow, - * [ - * "db_type" => "type", - * "db_name" => "name", - * "db_year" => "year", - * ] + * $dbRow, + * [ + * "db_type" => "type", + * "db_name" => "name", + * "db_year" => "year", + * ] * ); + * * // Allow assign only name and year * $robot->assign( - * $_POST, - * null, - * [ - * "name", - * "year", - * ] + * $_POST, + * null, + * [ + * "name", + * "year", + * ] * ); * * - * @param array $data + * + * @param array $data * @param array $dataColumnMap array to transform keys of data to another - * @param array $whiteList - * @return \Phalcon\Mvc\Model + * @param array $whiteList + * @return Model */ public function assign(array $data, $dataColumnMap = null, $whiteList = null) {} /** * Assigns values to a model from an array, returning a new model. + * * * $robot = \Phalcon\Mvc\Model::cloneResultMap( - * new Robots(), - * [ - * "type" => "mechanical", - * "name" => "Astro Boy", - * "year" => 1952, - * ] + * new Robots(), + * [ + * "type" => "mechanical", + * "name" => "Astro Boy", + * "year" => 1952, + * ] * ); * * - * @param \Phalcon\Mvc\ModelInterface|\Phalcon\Mvc\Model\Row $base - * @param array $data - * @param array $columnMap - * @param int $dirtyState - * @param boolean $keepSnapshots - * @return Model + * + * @param \Phalcon\Mvc\ModelInterface|\Phalcon\Mvc\Model\Row $base + * @param array $data + * @param array $columnMap + * @param int $dirtyState + * @param boolean $keepSnapshots + * @return Model */ public static function cloneResultMap($base, array $data, $columnMap, $dirtyState = 0, $keepSnapshots = null) {} /** * Returns an hydrated result based on the data and the column map * - * @param array $data - * @param array $columnMap - * @param int $hydrationMode - * @return mixed + * + * @param array $data + * @param array $columnMap + * @param int $hydrationMode + * @return mixed */ public static function cloneResultMapHydrate(array $data, $columnMap, $hydrationMode) {} /** * Assigns values to a model from an array returning a new model + * * * $robot = Phalcon\Mvc\Model::cloneResult( - * new Robots(), - * [ - * "type" => "mechanical", - * "name" => "Astro Boy", - * "year" => 1952, - * ] + * new Robots(), + * [ + * "type" => "mechanical", + * "name" => "Astro Boy", + * "year" => 1952, + * ] * ); * * - * @param mixed $base - * @param array $data - * @param int $dirtyState - * @param \Phalcon\Mvc\ModelInterface $$base - * @return \Phalcon\Mvc\ModelInterface + * + * @param ModelInterface $base + * @param array $data + * @param int $dirtyState + * @param \Phalcon\Mvc\ModelInterface $$base + * @return \Phalcon\Mvc\ModelInterface */ public static function cloneResult(ModelInterface $base, array $data, $dirtyState = 0) {} /** * Query for a set of records that match the specified conditions + * * * // How many robots are there? * $robots = Robots::find(); + * * echo "There are ", count($robots), "\n"; + * * // How many mechanical robots are there? * $robots = Robots::find( - * "type = 'mechanical'" + * "type = 'mechanical'" * ); + * * echo "There are ", count($robots), "\n"; + * * // Get and print virtual robots ordered by name * $robots = Robots::find( - * [ - * "type = 'virtual'", - * "order" => "name", - * ] + * [ + * "type = 'virtual'", + * "order" => "name", + * ] * ); + * * foreach ($robots as $robot) { - * echo $robot->name, "\n"; + * echo $robot->name, "\n"; * } + * * // Get first 100 virtual robots ordered by name * $robots = Robots::find( - * [ - * "type = 'virtual'", - * "order" => "name", - * "limit" => 100, - * ] + * [ + * "type = 'virtual'", + * "order" => "name", + * "limit" => 100, + * ] * ); + * * foreach ($robots as $robot) { - * echo $robot->name, "\n"; + * echo $robot->name, "\n"; * } * * - * @param mixed $parameters - * @return ResultsetInterface + * @param mixed $parameters + * @return ResultsetInterface */ public static function find($parameters = null) {} /** * Query the first record that matches the specified conditions + * * * // What's the first robot in robots table? * $robot = Robots::findFirst(); + * * echo "The robot name is ", $robot->name; + * * // What's the first mechanical robot in robots table? * $robot = Robots::findFirst( - * "type = 'mechanical'" + * "type = 'mechanical'" * ); + * * echo "The first mechanical robot name is ", $robot->name; + * * // Get first virtual robot ordered by name * $robot = Robots::findFirst( - * [ - * "type = 'virtual'", - * "order" => "name", - * ] + * [ + * "type = 'virtual'", + * "order" => "name", + * ] * ); + * * echo "The first virtual robot name is ", $robot->name; * * - * @param string|array $parameters - * @return static + * + * @param string|array $parameters + * @return Model */ public static function findFirst($parameters = null) {} /** * Create a criteria for a specific model * - * @param mixed $dependencyInjector - * @return \Phalcon\Mvc\Model\Criteria + * @param \Phalcon\DiInterface $dependencyInjector + * @return \Phalcon\Mvc\Model\Criteria */ public static function query(\Phalcon\DiInterface $dependencyInjector = null) {} /** * Checks whether the current record already exists * - * @param \Phalcon\Mvc\Model\MetaDataInterface $metaData - * @param \Phalcon\Db\AdapterInterface $connection - * @param string|array $table - * @return boolean + * + * @param \Phalcon\Mvc\Model\MetaDataInterface $metaData + * @param \Phalcon\Db\AdapterInterface $connection + * @param string|array $table + * @return bool */ protected function _exists(\Phalcon\Mvc\Model\MetaDataInterface $metaData, \Phalcon\Db\AdapterInterface $connection, $table = null) {} /** * Generate a PHQL SELECT statement for an aggregate * - * @param string $functionName - * @param string $alias - * @param array $parameters - * @param string $function - * @return \Phalcon\Mvc\Model\ResultsetInterface + * + * @param string $functionName + * @param string $alias + * @param array $parameters + * @param string $function + * @return ResultsetInterface */ protected static function _groupResult($functionName, $alias, $parameters) {} /** * Counts how many records match the specified conditions + * * * // How many robots are there? * $number = Robots::count(); + * * echo "There are ", $number, "\n"; + * * // How many mechanical robots are there? * $number = Robots::count("type = 'mechanical'"); + * * echo "There are ", $number, " mechanical robots\n"; * * - * @param array $parameters - * @return mixed + * + * @param array $parameters + * @return mixed */ public static function count($parameters = null) {} /** * Calculates the sum on a column for a result-set of rows that match the specified conditions + * * * // How much are all robots? * $sum = Robots::sum( - * [ - * "column" => "price", - * ] + * [ + * "column" => "price", + * ] * ); + * * echo "The total price of robots is ", $sum, "\n"; + * * // How much are mechanical robots? * $sum = Robots::sum( - * [ - * "type = 'mechanical'", - * "column" => "price", - * ] + * [ + * "type = 'mechanical'", + * "column" => "price", + * ] * ); + * * echo "The total price of mechanical robots is ", $sum, "\n"; * * - * @param array $parameters - * @return mixed + * + * @param array $parameters + * @return mixed */ public static function sum($parameters = null) {} /** * Returns the maximum value of a column for a result-set of rows that match the specified conditions + * * * // What is the maximum robot id? * $id = Robots::maximum( - * [ - * "column" => "id", - * ] + * [ + * "column" => "id", + * ] * ); + * * echo "The maximum robot id is: ", $id, "\n"; + * * // What is the maximum id of mechanical robots? * $sum = Robots::maximum( - * [ - * "type = 'mechanical'", - * "column" => "id", - * ] + * [ + * "type = 'mechanical'", + * "column" => "id", + * ] * ); + * * echo "The maximum robot id of mechanical robots is ", $id, "\n"; * * - * @param array $parameters - * @return mixed + * + * @param array $parameters + * @return mixed */ public static function maximum($parameters = null) {} /** * Returns the minimum value of a column for a result-set of rows that match the specified conditions + * * * // What is the minimum robot id? * $id = Robots::minimum( - * [ - * "column" => "id", - * ] + * [ + * "column" => "id", + * ] * ); + * * echo "The minimum robot id is: ", $id; + * * // What is the minimum id of mechanical robots? * $sum = Robots::minimum( - * [ - * "type = 'mechanical'", - * "column" => "id", - * ] + * [ + * "type = 'mechanical'", + * "column" => "id", + * ] * ); + * * echo "The minimum robot id of mechanical robots is ", $id; * * - * @param array $parameters - * @return mixed + * + * @param array $parameters + * @return mixed */ public static function minimum($parameters = null) {} /** * Returns the average value on a column for a result-set of rows matching the specified conditions + * * * // What's the average price of robots? * $average = Robots::average( - * [ - * "column" => "price", - * ] + * [ + * "column" => "price", + * ] * ); + * * echo "The average price is ", $average, "\n"; + * * // What's the average price of mechanical robots? * $average = Robots::average( - * [ - * "type = 'mechanical'", - * "column" => "price", - * ] + * [ + * "type = 'mechanical'", + * "column" => "price", + * ] * ); + * * echo "The average price of mechanical robots is ", $average, "\n"; * * - * @param array $parameters - * @return double + * + * @param array $parameters + * @return double */ public static function average($parameters = null) {} /** * Fires an event, implicitly calls behaviors and listeners in the events manager are notified * - * @param string $eventName - * @return bool + * @param string $eventName + * @return bool */ public function fireEvent($eventName) {} @@ -584,8 +655,8 @@ public function fireEvent($eventName) {} * Fires an event, implicitly calls behaviors and listeners in the events manager are notified * This method stops if one of the callbacks/listeners returns boolean false * - * @param string $eventName - * @return bool + * @param string $eventName + * @return bool */ public function fireEventCancel($eventName) {} @@ -596,111 +667,127 @@ protected function _cancelOperation() {} /** * Appends a customized message on the validation process + * * * use Phalcon\Mvc\Model; * use Phalcon\Mvc\Model\Message as Message; + * * class Robots extends Model * { - * public function beforeSave() - * { - * if ($this->name === "Peter") { - * $message = new Message( - * "Sorry, but a robot cannot be named Peter" - * ); - * $this->appendMessage($message); - * } - * } + * public function beforeSave() + * { + * if ($this->name === "Peter") { + * $message = new Message( + * "Sorry, but a robot cannot be named Peter" + * ); + * + * $this->appendMessage($message); + * } + * } * } * * - * @param mixed $message - * @return Model + * @param \Phalcon\Mvc\Model\MessageInterface $message + * @return Model */ public function appendMessage(\Phalcon\Mvc\Model\MessageInterface $message) {} /** * Executes validators on every validation call + * * * use Phalcon\Mvc\Model; * use Phalcon\Validation; * use Phalcon\Validation\Validator\ExclusionIn; + * * class Subscriptors extends Model * { - * public function validation() - * { - * $validator = new Validation(); - * $validator->add( - * "status", - * new ExclusionIn( - * [ - * "domain" => [ - * "A", - * "I", - * ], - * ] - * ) - * ); - * return $this->validate($validator); - * } + * public function validation() + * { + * $validator = new Validation(); + * + * $validator->add( + * "status", + * new ExclusionIn( + * [ + * "domain" => [ + * "A", + * "I", + * ], + * ] + * ) + * ); + * + * return $this->validate($validator); + * } * } * * - * @param mixed $validator - * @return bool + * @param \Phalcon\ValidationInterface $validator + * @return bool */ protected function validate(\Phalcon\ValidationInterface $validator) {} /** * Check whether validation process has generated any messages + * * * use Phalcon\Mvc\Model; * use Phalcon\Validation; * use Phalcon\Validation\Validator\ExclusionIn; + * * class Subscriptors extends Model * { - * public function validation() - * { - * $validator = new Validation(); - * $validator->validate( - * "status", - * new ExclusionIn( - * [ - * "domain" => [ - * "A", - * "I", - * ], - * ] - * ) - * ); - * return $this->validate($validator); - * } + * public function validation() + * { + * $validator = new Validation(); + * + * $validator->validate( + * "status", + * new ExclusionIn( + * [ + * "domain" => [ + * "A", + * "I", + * ], + * ] + * ) + * ); + * + * return $this->validate($validator); + * } * } * * - * @return bool + * @return bool */ public function validationHasFailed() {} /** * Returns array of validation messages + * * * $robot = new Robots(); + * * $robot->type = "mechanical"; * $robot->name = "Astro Boy"; * $robot->year = 1952; + * * if ($robot->save() === false) { - * echo "Umh, We can't store robots right now "; - * $messages = $robot->getMessages(); - * foreach ($messages as $message) { - * echo $message; - * } + * echo "Umh, We can't store robots right now "; + * + * $messages = $robot->getMessages(); + * + * foreach ($messages as $message) { + * echo $message; + * } * } else { - * echo "Great, a new robot was saved successfully!"; + * echo "Great, a new robot was saved successfully!"; * } * * - * @param mixed $filter - * @return MessageInterface[] + * @param mixed $filter + * @return \Phalcon\Mvc\Model\MessageInterface[] */ public function getMessages($filter = null) {} @@ -708,435 +795,483 @@ public function getMessages($filter = null) {} * Reads "belongs to" relations and check the virtual foreign keys when inserting or updating records * to verify that inserted/updated values are present in the related entity * - * @return bool + * @return bool */ protected final function _checkForeignKeysRestrict() {} /** * Reads both "hasMany" and "hasOne" relations and checks the virtual foreign keys (cascade) when deleting records * - * @return bool + * @return bool */ protected final function _checkForeignKeysReverseCascade() {} /** * Reads both "hasMany" and "hasOne" relations and checks the virtual foreign keys (restrict) when deleting records * - * @return bool + * @return bool */ protected final function _checkForeignKeysReverseRestrict() {} /** * Executes internal hooks before save a record * - * @param mixed $metaData - * @param bool $exists - * @param mixed $identityField - * @return bool + * @param \Phalcon\Mvc\Model\MetaDataInterface $metaData + * @param bool $exists + * @param mixed $identityField + * @return bool */ protected function _preSave(\Phalcon\Mvc\Model\MetaDataInterface $metaData, $exists, $identityField) {} /** * Executes internal events after save a record * - * @param bool $success - * @param bool $exists - * @return bool + * @param bool $success + * @param bool $exists + * @return bool */ protected function _postSave($success, $exists) {} /** * Sends a pre-build INSERT SQL statement to the relational database system * - * @param \Phalcon\Mvc\Model\MetaDataInterface $metaData - * @param \Phalcon\Db\AdapterInterface $connection - * @param string|array $table - * @param boolean|string $identityField - * @return boolean + * + * @param \Phalcon\Mvc\Model\MetaDataInterface $metaData + * @param \Phalcon\Db\AdapterInterface $connection + * @param string|array $table + * @param boolean|string $identityField + * @return bool */ protected function _doLowInsert(\Phalcon\Mvc\Model\MetaDataInterface $metaData, \Phalcon\Db\AdapterInterface $connection, $table, $identityField) {} /** * Sends a pre-build UPDATE SQL statement to the relational database system * - * @param \Phalcon\Mvc\Model\MetaDataInterface $metaData - * @param \Phalcon\Db\AdapterInterface $connection - * @param string|array $table - * @return boolean + * + * @param \Phalcon\Mvc\Model\MetaDataInterface $metaData + * @param \Phalcon\Db\AdapterInterface $connection + * @param string|array $table + * @return bool */ protected function _doLowUpdate(\Phalcon\Mvc\Model\MetaDataInterface $metaData, \Phalcon\Db\AdapterInterface $connection, $table) {} /** * Saves related records that must be stored prior to save the master record * - * @param \Phalcon\Db\AdapterInterface $connection - * @param \Phalcon\Mvc\ModelInterface[] $related - * @return boolean + * + * @param \Phalcon\Db\AdapterInterface $connection + * @param \Phalcon\Mvc\ModelInterface[] $related + * @return bool */ protected function _preSaveRelatedRecords(\Phalcon\Db\AdapterInterface $connection, $related) {} /** * Save the related records assigned in the has-one/has-many relations * - * @param \Phalcon\Db\AdapterInterface $connection - * @param \Phalcon\Mvc\ModelInterface[] $related - * @return boolean + * + * @param \Phalcon\Db\AdapterInterface $connection + * @param \Phalcon\Mvc\ModelInterface[] $related + * @return bool */ protected function _postSaveRelatedRecords(\Phalcon\Db\AdapterInterface $connection, $related) {} /** * Inserts or updates a model instance. Returning true on success or false otherwise. + * * * // Creating a new robot * $robot = new Robots(); + * * $robot->type = "mechanical"; * $robot->name = "Astro Boy"; * $robot->year = 1952; + * * $robot->save(); + * * // Updating a robot name * $robot = Robots::findFirst("id = 100"); + * * $robot->name = "Biomass"; + * * $robot->save(); * * - * @param array $data - * @param array $whiteList - * @return boolean + * + * @param array $data + * @param array $whiteList + * @return bool */ public function save($data = null, $whiteList = null) {} /** * Inserts a model instance. If the instance already exists in the persistence it will throw an exception * Returning true on success or false otherwise. + * * * // Creating a new robot * $robot = new Robots(); + * * $robot->type = "mechanical"; * $robot->name = "Astro Boy"; * $robot->year = 1952; + * * $robot->create(); + * * // Passing an array to create * $robot = new Robots(); + * * $robot->create( - * [ - * "type" => "mechanical", - * "name" => "Astro Boy", - * "year" => 1952, - * ] + * [ + * "type" => "mechanical", + * "name" => "Astro Boy", + * "year" => 1952, + * ] * ); * * - * @param mixed $data - * @param mixed $whiteList - * @return bool + * @param mixed $data + * @param mixed $whiteList + * @return bool */ public function create($data = null, $whiteList = null) {} /** * Updates a model instance. If the instance doesn't exist in the persistence it will throw an exception * Returning true on success or false otherwise. + * * * // Updating a robot name * $robot = Robots::findFirst("id = 100"); + * * $robot->name = "Biomass"; + * * $robot->update(); * * - * @param mixed $data - * @param mixed $whiteList - * @return bool + * @param mixed $data + * @param mixed $whiteList + * @return bool */ public function update($data = null, $whiteList = null) {} /** * Deletes a model instance. Returning true on success or false otherwise. + * * * $robot = Robots::findFirst("id=100"); + * * $robot->delete(); + * * $robots = Robots::find("type = 'mechanical'"); + * * foreach ($robots as $robot) { - * $robot->delete(); + * $robot->delete(); * } * * - * @return bool + * @return bool */ public function delete() {} /** * Returns the type of the latest operation performed by the ORM - * Returns one of the OP_* class constants + * Returns one of the OP_ class constants * - * @return int + * @return int */ public function getOperationMade() {} /** * Refreshes the model attributes re-querying the record from the database * - * @return Model + * @return Model */ public function refresh() {} /** * Skips the current operation forcing a success state * - * @param bool $skip + * @param bool $skip */ public function skipOperation($skip) {} /** * Reads an attribute value by its name + * * * echo $robot->readAttribute("name"); * * - * @param string $attribute + * @param string $attribute */ public function readAttribute($attribute) {} /** * Writes an attribute value by its name + * * * $robot->writeAttribute("name", "Rosey"); * * - * @param string $attribute - * @param mixed $value + * @param string $attribute + * @param mixed $value */ public function writeAttribute($attribute, $value) {} /** * Sets a list of attributes that must be skipped from the * generated INSERT/UPDATE statement + * * * skipAttributes( - * [ - * "price", - * ] - * ); - * } + * public function initialize() + * { + * $this->skipAttributes( + * [ + * "price", + * ] + * ); + * } * } * * - * @param array $attributes + * @param array $attributes */ protected function skipAttributes(array $attributes) {} /** * Sets a list of attributes that must be skipped from the * generated INSERT statement + * * * skipAttributesOnCreate( - * [ - * "created_at", - * ] - * ); - * } + * public function initialize() + * { + * $this->skipAttributesOnCreate( + * [ + * "created_at", + * ] + * ); + * } * } * * - * @param array $attributes + * @param array $attributes */ protected function skipAttributesOnCreate(array $attributes) {} /** * Sets a list of attributes that must be skipped from the * generated UPDATE statement + * * * skipAttributesOnUpdate( - * [ - * "modified_in", - * ] - * ); - * } + * public function initialize() + * { + * $this->skipAttributesOnUpdate( + * [ + * "modified_in", + * ] + * ); + * } * } * * - * @param array $attributes + * @param array $attributes */ protected function skipAttributesOnUpdate(array $attributes) {} /** * Sets a list of attributes that must be skipped from the * generated UPDATE statement + * * * allowEmptyStringValues( - * [ - * "name", - * ] - * ); - * } + * public function initialize() + * { + * $this->allowEmptyStringValues( + * [ + * "name", + * ] + * ); + * } * } * * - * @param array $attributes + * @param array $attributes */ protected function allowEmptyStringValues(array $attributes) {} /** * Setup a 1-1 relation between two models + * * * hasOne("id", "RobotsDescription", "robots_id"); - * } + * public function initialize() + * { + * $this->hasOne("id", "RobotsDescription", "robots_id"); + * } * } * * - * @param mixed $fields - * @param string $referenceModel - * @param mixed $referencedFields - * @param mixed $options - * @return \Phalcon\Mvc\Model\Relation + * @param mixed $fields + * @param string $referenceModel + * @param mixed $referencedFields + * @param mixed $options + * @return \Phalcon\Mvc\Model\Relation */ protected function hasOne($fields, $referenceModel, $referencedFields, $options = null) {} /** * Setup a reverse 1-1 or n-1 relation between two models + * * * belongsTo("robots_id", "Robots", "id"); - * } + * public function initialize() + * { + * $this->belongsTo("robots_id", "Robots", "id"); + * } * } * * - * @param mixed $fields - * @param string $referenceModel - * @param mixed $referencedFields - * @param mixed $options - * @return \Phalcon\Mvc\Model\Relation + * @param mixed $fields + * @param string $referenceModel + * @param mixed $referencedFields + * @param mixed $options + * @return \Phalcon\Mvc\Model\Relation */ protected function belongsTo($fields, $referenceModel, $referencedFields, $options = null) {} /** * Setup a 1-n relation between two models + * * * hasMany("id", "RobotsParts", "robots_id"); - * } + * public function initialize() + * { + * $this->hasMany("id", "RobotsParts", "robots_id"); + * } * } * * - * @param mixed $fields - * @param string $referenceModel - * @param mixed $referencedFields - * @param mixed $options - * @return \Phalcon\Mvc\Model\Relation + * @param mixed $fields + * @param string $referenceModel + * @param mixed $referencedFields + * @param mixed $options + * @return \Phalcon\Mvc\Model\Relation */ protected function hasMany($fields, $referenceModel, $referencedFields, $options = null) {} /** * Setup an n-n relation between two models, through an intermediate relation + * * * hasManyToMany( - * "id", - * "RobotsParts", - * "robots_id", - * "parts_id", - * "Parts", - * "id", - * ); - * } + * public function initialize() + * { + * // Setup a many-to-many relation to Parts through RobotsParts + * $this->hasManyToMany( + * "id", + * "RobotsParts", + * "robots_id", + * "parts_id", + * "Parts", + * "id", + * ); + * } * } * * + * * @param string|array fields * @param string intermediateModel * @param string|array intermediateFields * @param string|array intermediateReferencedFields * @param string referencedModel - * @param mixed $fields - * @param string $intermediateModel - * @param mixed $intermediateFields - * @param mixed $intermediateReferencedFields - * @param string $referenceModel - * @param string|array $referencedFields - * @param array $options - * @return \Phalcon\Mvc\Model\Relation + * @param mixed $fields + * @param string $intermediateModel + * @param mixed $intermediateFields + * @param mixed $intermediateReferencedFields + * @param string $referenceModel + * @param string|array $referencedFields + * @param array $options + * @return \Phalcon\Mvc\Model\Relation */ protected function hasManyToMany($fields, $intermediateModel, $intermediateFields, $intermediateReferencedFields, $referenceModel, $referencedFields, $options = null) {} /** * Setups a behavior in a model + * * * addBehavior( - * new Timestampable( - * [ - * "onCreate" => [ - * "field" => "created_at", - * "format" => "Y-m-d", - * ], - * ] - * ) - * ); - * } + * public function initialize() + * { + * $this->addBehavior( + * new Timestampable( + * [ + * "onCreate" => [ + * "field" => "created_at", + * "format" => "Y-m-d", + * ], + * ] + * ) + * ); + * } * } * * - * @param mixed $behavior + * @param \Phalcon\Mvc\Model\BehaviorInterface $behavior */ public function addBehavior(\Phalcon\Mvc\Model\BehaviorInterface $behavior) {} /** * Sets if the model must keep the original record snapshot in memory + * * * keepSnapshots(true); - * } + * public function initialize() + * { + * $this->keepSnapshots(true); + * } * } * * - * @param bool $keepSnapshot + * @param bool $keepSnapshot */ protected function keepSnapshots($keepSnapshot) {} @@ -1144,22 +1279,23 @@ protected function keepSnapshots($keepSnapshot) {} * Sets the record's snapshot data. * This method is used internally to set snapshot data when the model was set up to keep snapshot data * - * @param array $data - * @param array $columnMap + * + * @param array $data + * @param array $columnMap */ public function setSnapshotData(array $data, $columnMap = null) {} /** * Checks if the object has internal snapshot data * - * @return bool + * @return bool */ public function hasSnapshotData() {} /** * Returns the internal snapshot data * - * @return array + * @return array */ public function getSnapshotData() {} @@ -1167,173 +1303,190 @@ public function getSnapshotData() {} * Check if a specific attribute has changed * This only works if the model is keeping data snapshots * - * @param string|array $fieldName - * @return bool + * + * @param string|array $fieldName + * @return bool */ public function hasChanged($fieldName = null) {} /** * Returns a list of changed values * - * @return array + * @return array */ public function getChangedFields() {} /** * Sets if a model must use dynamic update instead of the all-field update + * * * useDynamicUpdate(true); - * } + * public function initialize() + * { + * $this->useDynamicUpdate(true); + * } * } * * - * @param bool $dynamicUpdate + * @param bool $dynamicUpdate */ protected function useDynamicUpdate($dynamicUpdate) {} /** * Returns related records based on defined relations * - * @param string $alias - * @param array $arguments - * @return \Phalcon\Mvc\Model\ResultsetInterface + * + * @param string $alias + * @param array $arguments + * @return ResultsetInterface */ public function getRelated($alias, $arguments = null) {} /** * Returns related records defined relations depending on the method name * - * @param string $modelName - * @param string $method - * @param array $arguments - * @return mixed + * + * @param string $modelName + * @param string $method + * @param array $arguments + * @return mixed */ protected function _getRelatedRecords($modelName, $method, $arguments) {} /** * Try to check if the query must invoke a finder * - * @param string $method - * @param array $arguments - * @return \Phalcon\Mvc\ModelInterface[]|\Phalcon\Mvc\ModelInterface|boolean + * + * @param string $method + * @param array $arguments + * @return \Phalcon\Mvc\ModelInterface[]|\Phalcon\Mvc\ModelInterface|boolean */ protected final static function _invokeFinder($method, $arguments) {} /** * Handles method calls when a method is not implemented * + * * @param string method * @param array arguments * @return mixed - * @param string $method - * @param mixed $arguments + * @param string $method + * @param mixed $arguments */ public function __call($method, $arguments) {} /** * Handles method calls when a static method is not implemented * + * * @param string method * @param array arguments * @return mixed - * @param string $method - * @param mixed $arguments + * @param string $method + * @param mixed $arguments */ public static function __callStatic($method, $arguments) {} /** * Magic method to assign values to the the model * - * @param string $property - * @param mixed $value + * + * @param string $property + * @param mixed $value */ public function __set($property, $value) {} /** * Check for, and attempt to use, possible setter. * - * @param string $property - * @param mixed $value - * @return string + * + * @param string $property + * @param mixed $value + * @return string */ protected final function _possibleSetter($property, $value) {} /** * Magic method to get related records using the relation alias as a property * - * @param string $property - * @return \Phalcon\Mvc\Model\Resultset|Phalcon\Mvc\Model + * + * @param string $property + * @return \Phalcon\Mvc\Model\Resultset|Phalcon\Mvc\Model */ public function __get($property) {} /** * Magic method to check if a property is a valid relation * - * @param string $property - * @return bool + * @param string $property + * @return bool */ public function __isset($property) {} /** * Serializes the object ignoring connections, services, related objects or static properties * - * @return string + * @return string */ public function serialize() {} /** * Unserializes the object from a serialized string * - * @param string $data + * @param string $data */ public function unserialize($data) {} /** * Returns a simple representation of the object that can be used with var_dump + * * * var_dump( - * $robot->dump() + * $robot->dump() * ); * * - * @return array + * @return array */ public function dump() {} /** * Returns the instance as an array representation + * * * print_r( - * $robot->toArray() + * $robot->toArray() * ); * * - * @param mixed $columns - * @param array $$columns - * @return array + * + * @param mixed $columns + * @param array $$columns + * @return array */ public function toArray($columns = null) {} /** * Serializes the object for json_encode + * * * echo json_encode($robot); * * - * @return array + * + * @return array */ public function jsonSerialize() {} /** * Enables/disables options in the ORM * - * @param array $options + * @param array $options */ public static function setup(array $options) {} diff --git a/ide/stubs/Phalcon/mvc/ModelInterface.php b/ide/stubs/Phalcon/mvc/ModelInterface.php index 7a1def379..c95f64746 100644 --- a/ide/stubs/Phalcon/mvc/ModelInterface.php +++ b/ide/stubs/Phalcon/mvc/ModelInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\ModelInterface + * * Interface for Phalcon\Mvc\Model */ interface ModelInterface @@ -12,201 +13,217 @@ interface ModelInterface /** * Sets a transaction related to the Model instance * - * @param mixed $transaction - * @return \Phalcon\Mvc\ModelInterface + * @param \Phalcon\Mvc\Model\TransactionInterface $transaction + * @return \Phalcon\Mvc\ModelInterface */ public function setTransaction(\Phalcon\Mvc\Model\TransactionInterface $transaction); /** * Returns table name mapped in the model * - * @return string + * + * @return string */ public function getSource(); /** * Returns schema name where table mapped is located * - * @return string + * + * @return string */ public function getSchema(); /** * Sets both read/write connection services * - * @param string $connectionService + * @param string $connectionService */ public function setConnectionService($connectionService); /** * Sets the DependencyInjection connection service used to write data * - * @param string $connectionService + * @param string $connectionService */ public function setWriteConnectionService($connectionService); /** * Sets the DependencyInjection connection service used to read data * - * @param string $connectionService + * @param string $connectionService */ public function setReadConnectionService($connectionService); /** * Returns DependencyInjection connection service used to read data * - * @return string + * @return string */ public function getReadConnectionService(); /** * Returns DependencyInjection connection service used to write data * - * @return string + * @return string */ public function getWriteConnectionService(); /** * Gets internal database connection * - * @return \Phalcon\Db\AdapterInterface + * @return \Phalcon\Db\AdapterInterface */ public function getReadConnection(); /** * Gets internal database connection * - * @return \Phalcon\Db\AdapterInterface + * @return \Phalcon\Db\AdapterInterface */ public function getWriteConnection(); /** - * Sets the dirty state of the object using one of the DIRTY_STATE_* constants + * Sets the dirty state of the object using one of the DIRTY_STATE_ constants * - * @param int $dirtyState - * @return \Phalcon\Mvc\ModelInterface + * @param int $dirtyState + * @return \Phalcon\Mvc\ModelInterface */ public function setDirtyState($dirtyState); /** - * Returns one of the DIRTY_STATE_* constants telling if the record exists in the database or not + * Returns one of the DIRTY_STATE_ constants telling if the record exists in the database or not * - * @return int + * + * @return int */ public function getDirtyState(); /** * Assigns values to a model from an array * - * @param array $data - * @param mixed $dataColumnMap - * @param mixed $whiteList - * @param \Phalcon\Mvc\Model $object - * @param array $columnMap - * @return \Phalcon\Mvc\Model + * + * @param array $data + * @param mixed $dataColumnMap + * @param mixed $whiteList + * @param \Phalcon\Mvc\Model $object + * @param array $columnMap + * @return \Phalcon\Mvc\Model */ public function assign(array $data, $dataColumnMap = null, $whiteList = null); /** * Assigns values to a model from an array returning a new model * - * @param \Phalcon\Mvc\Model $base - * @param array $data - * @param array $columnMap - * @param int $dirtyState - * @param boolean $keepSnapshots - * @return \Phalcon\Mvc\Model + * + * @param \Phalcon\Mvc\Model $base + * @param array $data + * @param array $columnMap + * @param int $dirtyState + * @param boolean $keepSnapshots + * @return \Phalcon\Mvc\Model */ public static function cloneResultMap($base, array $data, $columnMap, $dirtyState = 0, $keepSnapshots = null); /** * Assigns values to a model from an array returning a new model * - * @param \Phalcon\Mvc\ModelInterface $base - * @param array $data - * @param int $dirtyState - * @return \Phalcon\Mvc\ModelInterface + * + * @param \Phalcon\Mvc\ModelInterface $base + * @param array $data + * @param int $dirtyState + * @return \Phalcon\Mvc\ModelInterface */ public static function cloneResult(\Phalcon\Mvc\ModelInterface $base, array $data, $dirtyState = 0); /** * Returns an hydrated result based on the data and the column map * - * @param array $data - * @param array $columnMap - * @param int $hydrationMode + * + * @param array $data + * @param array $columnMap + * @param int $hydrationMode */ public static function cloneResultMapHydrate(array $data, $columnMap, $hydrationMode); /** * Allows to query a set of records that match the specified conditions * - * @param mixed $parameters - * @return \Phalcon\Mvc\Model\ResultsetInterface + * + * @param mixed $parameters + * @return \Phalcon\Mvc\Model\ResultsetInterface */ public static function find($parameters = null); /** * Allows to query the first record that match the specified conditions * - * @param array $parameters - * @return static + * + * @param array $parameters + * @return static */ public static function findFirst($parameters = null); /** * Create a criteria for a specific model * - * @param \Phalcon\DiInterface $dependencyInjector - * @return \Phalcon\Mvc\Model\CriteriaInterface + * + * @param \Phalcon\DiInterface $dependencyInjector + * @return \Phalcon\Mvc\Model\CriteriaInterface */ public static function query(\Phalcon\DiInterface $dependencyInjector = null); /** * Allows to count how many records match the specified conditions * - * @param array $parameters - * @return int + * + * @param array $parameters + * @return int */ public static function count($parameters = null); /** * Allows to calculate a sum on a column that match the specified conditions * - * @param array $parameters - * @return double + * + * @param array $parameters + * @return double */ public static function sum($parameters = null); /** * Allows to get the maximum value of a column that match the specified conditions * - * @param array $parameters - * @return mixed + * + * @param array $parameters + * @return mixed */ public static function maximum($parameters = null); /** * Allows to get the minimum value of a column that match the specified conditions * - * @param array $parameters - * @return mixed + * + * @param array $parameters + * @return mixed */ public static function minimum($parameters = null); /** * Allows to calculate the average value on a column matching the specified conditions * - * @param array $parameters - * @return double + * + * @param array $parameters + * @return double */ public static function average($parameters = null); /** * Fires an event, implicitly calls behaviors and listeners in the events manager are notified * - * @param string $eventName - * @return boolean + * + * @param string $eventName + * @return boolean */ public function fireEvent($eventName); @@ -214,38 +231,42 @@ public function fireEvent($eventName); * Fires an event, implicitly calls behaviors and listeners in the events manager are notified * This method stops if one of the callbacks/listeners returns boolean false * - * @param string $eventName - * @return boolean + * + * @param string $eventName + * @return boolean */ public function fireEventCancel($eventName); /** * Appends a customized message on the validation process * - * @param mixed $message + * @param \Phalcon\Mvc\Model\MessageInterface $message */ public function appendMessage(\Phalcon\Mvc\Model\MessageInterface $message); /** * Check whether validation process has generated any messages * - * @return boolean + * + * @return boolean */ public function validationHasFailed(); /** * Returns array of validation messages * - * @return \Phalcon\Mvc\Model\MessageInterface[] + * + * @return \Phalcon\Mvc\Model\MessageInterface[] */ public function getMessages(); /** * Inserts or updates a model instance. Returning true on success or false otherwise. * - * @param array $data - * @param array $whiteList - * @return boolean + * + * @param array $data + * @param array $whiteList + * @return boolean */ public function save($data = null, $whiteList = null); @@ -253,9 +274,10 @@ public function save($data = null, $whiteList = null); * Inserts a model instance. If the instance already exists in the persistence it will throw an exception * Returning true on success or false otherwise. * - * @param array $data - * @param array $whiteList - * @return boolean + * + * @param array $data + * @param array $whiteList + * @return boolean */ public function create($data = null, $whiteList = null); @@ -263,24 +285,27 @@ public function create($data = null, $whiteList = null); * Updates a model instance. If the instance doesn't exist in the persistence it will throw an exception * Returning true on success or false otherwise. * - * @param array $data - * @param array $whiteList - * @return boolean + * + * @param array $data + * @param array $whiteList + * @return boolean */ public function update($data = null, $whiteList = null); /** * Deletes a model instance. Returning true on success or false otherwise. * - * @return boolean + * + * @return boolean */ public function delete(); /** * Returns the type of the latest operation performed by the ORM - * Returns one of the OP_* class constants + * Returns one of the OP_ class constants * - * @return int + * + * @return int */ public function getOperationMade(); @@ -292,16 +317,17 @@ public function refresh(); /** * Skips the current operation forcing a success state * - * @param bool $skip + * @param bool $skip */ public function skipOperation($skip); /** * Returns related records based on defined relations * - * @param string $alias - * @param array $arguments - * @return \Phalcon\Mvc\Model\ResultsetInterface + * + * @param string $alias + * @param array $arguments + * @return \Phalcon\Mvc\Model\ResultsetInterface */ public function getRelated($alias, $arguments = null); @@ -309,8 +335,9 @@ public function getRelated($alias, $arguments = null); * Sets the record's snapshot data. * This method is used internally to set snapshot data when the model was set up to keep snapshot data * - * @param array $data - * @param array $columnMap + * + * @param array $data + * @param array $columnMap */ public function setSnapshotData(array $data, $columnMap = null); diff --git a/ide/stubs/Phalcon/mvc/ModuleDefinitionInterface.php b/ide/stubs/Phalcon/mvc/ModuleDefinitionInterface.php index 6df77b02c..a1336e4eb 100644 --- a/ide/stubs/Phalcon/mvc/ModuleDefinitionInterface.php +++ b/ide/stubs/Phalcon/mvc/ModuleDefinitionInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\ModuleDefinitionInterface + * * This interface must be implemented by class module definitions */ interface ModuleDefinitionInterface @@ -12,14 +13,14 @@ interface ModuleDefinitionInterface /** * Registers an autoloader related to the module * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function registerAutoloaders(\Phalcon\DiInterface $dependencyInjector = null); /** * Registers services related to the module * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function registerServices(\Phalcon\DiInterface $dependencyInjector); diff --git a/ide/stubs/Phalcon/mvc/Router.php b/ide/stubs/Phalcon/mvc/Router.php index 7dd6ff2a0..6a4c15cd7 100644 --- a/ide/stubs/Phalcon/mvc/Router.php +++ b/ide/stubs/Phalcon/mvc/Router.php @@ -4,21 +4,27 @@ /** * Phalcon\Mvc\Router + * * Phalcon\Mvc\Router is the standard framework router. Routing is the * process of taking a URI endpoint (that part of the URI which comes after the base URL) and * decomposing it into parameters to determine which module, controller, and * action of that controller should receive the request + * * * use Phalcon\Mvc\Router; + * * $router = new Router(); + * * $router->add( - * "/documentation/{chapter}/{name}\.{type:[a-z]+}", - * [ - * "controller" => "documentation", - * "action" => "show", - * ] + * "/documentation/{chapter}/{name}\.{type:[a-z]+}", + * [ + * "controller" => "documentation", + * "action" => "show", + * ] * ); + * * $router->handle(); + * * echo $router->getControllerName(); * */ @@ -97,265 +103,271 @@ class Router implements \Phalcon\Di\InjectionAwareInterface, \Phalcon\Mvc\Router /** * Phalcon\Mvc\Router constructor * - * @param bool $defaultRoutes + * @param bool $defaultRoutes */ public function __construct($defaultRoutes = true) {} /** * Sets the dependency injector * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the internal dependency injector * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI() {} /** * Sets the events manager * - * @param mixed $eventsManager + * @param \Phalcon\Events\ManagerInterface $eventsManager */ public function setEventsManager(\Phalcon\Events\ManagerInterface $eventsManager) {} /** * Returns the internal event manager * - * @return \Phalcon\Events\ManagerInterface + * @return \Phalcon\Events\ManagerInterface */ public function getEventsManager() {} /** * Get rewrite info. This info is read from $_GET["_url"]. This returns '/' if the rewrite information cannot be read * - * @return string + * @return string */ public function getRewriteUri() {} /** - * Sets the URI source. One of the URI_SOURCE_* constants + * Sets the URI source. One of the URI_SOURCE_ constants + * * * $router->setUriSource( - * Router::URI_SOURCE_SERVER_REQUEST_URI + * Router::URI_SOURCE_SERVER_REQUEST_URI * ); * * - * @param mixed $uriSource - * @return RouterInterface + * @param mixed $uriSource + * @return RouterInterface */ public function setUriSource($uriSource) {} /** * Set whether router must remove the extra slashes in the handled routes * - * @param bool $remove - * @return RouterInterface + * @param bool $remove + * @return RouterInterface */ public function removeExtraSlashes($remove) {} /** * Sets the name of the default namespace * - * @param string $namespaceName - * @return RouterInterface + * @param string $namespaceName + * @return RouterInterface */ public function setDefaultNamespace($namespaceName) {} /** * Sets the name of the default module * - * @param string $moduleName - * @return RouterInterface + * @param string $moduleName + * @return RouterInterface */ public function setDefaultModule($moduleName) {} /** * Sets the default controller name * - * @param string $controllerName - * @return RouterInterface + * @param string $controllerName + * @return RouterInterface */ public function setDefaultController($controllerName) {} /** * Sets the default action name * - * @param string $actionName - * @return RouterInterface + * @param string $actionName + * @return RouterInterface */ public function setDefaultAction($actionName) {} /** * Sets an array of default paths. If a route is missing a path the router will use the defined here * This method must not be used to set a 404 route + * * * $router->setDefaults( - * [ - * "module" => "common", - * "action" => "index", - * ] + * [ + * "module" => "common", + * "action" => "index", + * ] * ); * * - * @param array $defaults - * @return RouterInterface + * @param array $defaults + * @return RouterInterface */ public function setDefaults(array $defaults) {} /** * Returns an array of default parameters * - * @return array + * @return array */ public function getDefaults() {} /** * Handles routing information received from the rewrite engine + * * * // Read the info from the rewrite engine * $router->handle(); + * * // Manually passing an URL * $router->handle("/posts/edit/1"); * * - * @param string $uri + * @param string $uri */ public function handle($uri = null) {} /** * Adds a route to the router without any HTTP constraint + * * * use Phalcon\Mvc\Router; + * * $router->add("/about", "About::index"); * $router->add("/about", "About::index", ["GET", "POST"]); * $router->add("/about", "About::index", ["GET", "POST"], Router::POSITION_FIRST); * * - * @param string $pattern - * @param mixed $paths - * @param mixed $httpMethods - * @param mixed $position - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @param mixed $httpMethods + * @param mixed $position + * @return \Phalcon\Mvc\Router\RouteInterface */ public function add($pattern, $paths = null, $httpMethods = null, $position = Router::POSITION_LAST) {} /** * Adds a route to the router that only match if the HTTP method is GET * - * @param string $pattern - * @param mixed $paths - * @param mixed $position - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @param mixed $position + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addGet($pattern, $paths = null, $position = Router::POSITION_LAST) {} /** * Adds a route to the router that only match if the HTTP method is POST * - * @param string $pattern - * @param mixed $paths - * @param mixed $position - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @param mixed $position + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addPost($pattern, $paths = null, $position = Router::POSITION_LAST) {} /** * Adds a route to the router that only match if the HTTP method is PUT * - * @param string $pattern - * @param mixed $paths - * @param mixed $position - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @param mixed $position + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addPut($pattern, $paths = null, $position = Router::POSITION_LAST) {} /** * Adds a route to the router that only match if the HTTP method is PATCH * - * @param string $pattern - * @param mixed $paths - * @param mixed $position - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @param mixed $position + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addPatch($pattern, $paths = null, $position = Router::POSITION_LAST) {} /** * Adds a route to the router that only match if the HTTP method is DELETE * - * @param string $pattern - * @param mixed $paths - * @param mixed $position - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @param mixed $position + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addDelete($pattern, $paths = null, $position = Router::POSITION_LAST) {} /** * Add a route to the router that only match if the HTTP method is OPTIONS * - * @param string $pattern - * @param mixed $paths - * @param mixed $position - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @param mixed $position + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addOptions($pattern, $paths = null, $position = Router::POSITION_LAST) {} /** * Adds a route to the router that only match if the HTTP method is HEAD * - * @param string $pattern - * @param mixed $paths - * @param mixed $position - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @param mixed $position + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addHead($pattern, $paths = null, $position = Router::POSITION_LAST) {} /** * Adds a route to the router that only match if the HTTP method is PURGE (Squid and Varnish support) * - * @param string $pattern - * @param mixed $paths - * @param mixed $position - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @param mixed $position + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addPurge($pattern, $paths = null, $position = Router::POSITION_LAST) {} /** * Adds a route to the router that only match if the HTTP method is TRACE * - * @param string $pattern - * @param mixed $paths - * @param mixed $position - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @param mixed $position + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addTrace($pattern, $paths = null, $position = Router::POSITION_LAST) {} /** * Adds a route to the router that only match if the HTTP method is CONNECT * - * @param string $pattern - * @param mixed $paths - * @param mixed $position - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @param mixed $position + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addConnect($pattern, $paths = null, $position = Router::POSITION_LAST) {} /** * Mounts a group of routes in the router * - * @param mixed $group - * @return RouterInterface + * @param \Phalcon\Mvc\Router\GroupInterface $group + * @return RouterInterface */ public function mount(\Phalcon\Mvc\Router\GroupInterface $group) {} /** * Set a group of paths to be returned when none of the defined routes are matched * - * @param mixed $paths - * @return RouterInterface + * @param mixed $paths + * @return RouterInterface */ public function notFound($paths) {} @@ -367,86 +379,86 @@ public function clear() {} /** * Returns the processed namespace name * - * @return string + * @return string */ public function getNamespaceName() {} /** * Returns the processed module name * - * @return string + * @return string */ public function getModuleName() {} /** * Returns the processed controller name * - * @return string + * @return string */ public function getControllerName() {} /** * Returns the processed action name * - * @return string + * @return string */ public function getActionName() {} /** * Returns the processed parameters * - * @return array + * @return array */ public function getParams() {} /** * Returns the route that matches the handled URI * - * @return \Phalcon\Mvc\Router\RouteInterface + * @return \Phalcon\Mvc\Router\RouteInterface */ public function getMatchedRoute() {} /** * Returns the sub expressions in the regular expression matched * - * @return array + * @return array */ public function getMatches() {} /** * Checks if the router matches any of the defined routes * - * @return bool + * @return bool */ public function wasMatched() {} /** * Returns all the routes defined in the router * - * @return RouteInterface[] + * @return \Phalcon\Mvc\Router\RouteInterface[] */ public function getRoutes() {} /** * Returns a route object by its id * - * @param mixed $id - * @return bool|\Phalcon\Mvc\Router\RouteInterface + * @param mixed $id + * @return bool|\Phalcon\Mvc\Router\RouteInterface */ public function getRouteById($id) {} /** * Returns a route object by its name * - * @param string $name - * @return bool|\Phalcon\Mvc\Router\RouteInterface + * @param string $name + * @return bool|\Phalcon\Mvc\Router\RouteInterface */ public function getRouteByName($name) {} /** * Returns whether controller name should not be mangled * - * @return bool + * @return bool */ public function isExactControllerName() {} diff --git a/ide/stubs/Phalcon/mvc/RouterInterface.php b/ide/stubs/Phalcon/mvc/RouterInterface.php index 9e17f1fc0..f257540bc 100644 --- a/ide/stubs/Phalcon/mvc/RouterInterface.php +++ b/ide/stubs/Phalcon/mvc/RouterInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\RouterInterface + * * Interface for Phalcon\Mvc\Router */ interface RouterInterface @@ -12,143 +13,143 @@ interface RouterInterface /** * Sets the name of the default module * - * @param string $moduleName + * @param string $moduleName */ public function setDefaultModule($moduleName); /** * Sets the default controller name * - * @param string $controllerName + * @param string $controllerName */ public function setDefaultController($controllerName); /** * Sets the default action name * - * @param string $actionName + * @param string $actionName */ public function setDefaultAction($actionName); /** * Sets an array of default paths * - * @param array $defaults + * @param array $defaults */ public function setDefaults(array $defaults); /** * Handles routing information received from the rewrite engine * - * @param string $uri + * @param string $uri */ public function handle($uri = null); /** * Adds a route to the router on any HTTP method * - * @param string $pattern - * @param mixed $paths - * @param mixed $httpMethods - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @param mixed $httpMethods + * @return \Phalcon\Mvc\Router\RouteInterface */ public function add($pattern, $paths = null, $httpMethods = null); /** * Adds a route to the router that only match if the HTTP method is GET * - * @param string $pattern - * @param mixed $paths - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addGet($pattern, $paths = null); /** * Adds a route to the router that only match if the HTTP method is POST * - * @param string $pattern - * @param mixed $paths - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addPost($pattern, $paths = null); /** * Adds a route to the router that only match if the HTTP method is PUT * - * @param string $pattern - * @param mixed $paths - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addPut($pattern, $paths = null); /** * Adds a route to the router that only match if the HTTP method is PATCH * - * @param string $pattern - * @param mixed $paths - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addPatch($pattern, $paths = null); /** * Adds a route to the router that only match if the HTTP method is DELETE * - * @param string $pattern - * @param mixed $paths - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addDelete($pattern, $paths = null); /** * Add a route to the router that only match if the HTTP method is OPTIONS * - * @param string $pattern - * @param mixed $paths - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addOptions($pattern, $paths = null); /** * Adds a route to the router that only match if the HTTP method is HEAD * - * @param string $pattern - * @param mixed $paths - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addHead($pattern, $paths = null); /** * Adds a route to the router that only match if the HTTP method is PURGE (Squid and Varnish support) * - * @param string $pattern - * @param mixed $paths - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addPurge($pattern, $paths = null); /** * Adds a route to the router that only match if the HTTP method is TRACE * - * @param string $pattern - * @param mixed $paths - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addTrace($pattern, $paths = null); /** * Adds a route to the router that only match if the HTTP method is CONNECT * - * @param string $pattern - * @param mixed $paths - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addConnect($pattern, $paths = null); /** * Mounts a group of routes in the router * - * @param mixed $group - * @return RouterInterface + * @param \Phalcon\Mvc\Router\GroupInterface $group + * @return RouterInterface */ public function mount(\Phalcon\Mvc\Router\GroupInterface $group); @@ -160,79 +161,79 @@ public function clear(); /** * Returns processed module name * - * @return string + * @return string */ public function getModuleName(); /** * Returns processed namespace name * - * @return string + * @return string */ public function getNamespaceName(); /** * Returns processed controller name * - * @return string + * @return string */ public function getControllerName(); /** * Returns processed action name * - * @return string + * @return string */ public function getActionName(); /** * Returns processed extra params * - * @return array + * @return array */ public function getParams(); /** * Returns the route that matches the handled URI * - * @return \Phalcon\Mvc\Router\RouteInterface + * @return \Phalcon\Mvc\Router\RouteInterface */ public function getMatchedRoute(); /** * Return the sub expressions in the regular expression matched * - * @return array + * @return array */ public function getMatches(); /** * Check if the router matches any of the defined routes * - * @return bool + * @return bool */ public function wasMatched(); /** * Return all the routes defined in the router * - * @return RouteInterface[] + * @return \Phalcon\Mvc\Router\RouteInterface[] */ public function getRoutes(); /** * Returns a route object by its id * - * @param mixed $id - * @return \Phalcon\Mvc\Router\RouteInterface + * @param mixed $id + * @return \Phalcon\Mvc\Router\RouteInterface */ public function getRouteById($id); /** * Returns a route object by its name * - * @param string $name - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $name + * @return \Phalcon\Mvc\Router\RouteInterface */ public function getRouteByName($name); diff --git a/ide/stubs/Phalcon/mvc/Url.php b/ide/stubs/Phalcon/mvc/Url.php index 91845bcac..92b6e69a4 100644 --- a/ide/stubs/Phalcon/mvc/Url.php +++ b/ide/stubs/Phalcon/mvc/Url.php @@ -4,17 +4,20 @@ /** * Phalcon\Mvc\Url + * * This components helps in the generation of: URIs, URLs and Paths + * * * // Generate a URL appending the URI to the base URI * echo $url->get("products/edit/1"); + * * // Generate a URL for a predefined route * echo $url->get( - * [ - * "for" => "blog-post", - * "title" => "some-cool-stuff", - * "year" => "2012", - * ] + * [ + * "for" => "blog-post", + * "title" => "some-cool-stuff", + * "year" => "2012", + * ] * ); * */ @@ -39,132 +42,142 @@ class Url implements \Phalcon\Mvc\UrlInterface, \Phalcon\Di\InjectionAwareInterf /** * Sets the DependencyInjector container * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the DependencyInjector container * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI() {} /** * Sets a prefix for all the URIs to be generated + * * * $url->setBaseUri("/invo/"); + * * $url->setBaseUri("/invo/index.php/"); * * - * @param string $baseUri - * @return Url + * @param string $baseUri + * @return Url */ public function setBaseUri($baseUri) {} /** * Sets a prefix for all static URLs generated + * * * $url->setStaticBaseUri("/invo/"); * * - * @param string $staticBaseUri - * @return Url + * @param string $staticBaseUri + * @return Url */ public function setStaticBaseUri($staticBaseUri) {} /** * Returns the prefix for all the generated urls. By default / * - * @return string + * @return string */ public function getBaseUri() {} /** * Returns the prefix for all the generated static urls. By default / * - * @return string + * @return string */ public function getStaticBaseUri() {} /** * Sets a base path for all the generated paths + * * * $url->setBasePath("/var/www/htdocs/"); * * - * @param string $basePath - * @return Url + * @param string $basePath + * @return Url */ public function setBasePath($basePath) {} /** * Returns the base path * - * @return string + * @return string */ public function getBasePath() {} /** * Generates a URL + * * * // Generate a URL appending the URI to the base URI * echo $url->get("products/edit/1"); + * * // Generate a URL for a predefined route * echo $url->get( - * [ - * "for" => "blog-post", - * "title" => "some-cool-stuff", - * "year" => "2015", - * ] + * [ + * "for" => "blog-post", + * "title" => "some-cool-stuff", + * "year" => "2015", + * ] * ); + * * // Generate a URL with GET arguments (/show/products?id=1&name=Carrots) * echo $url->get( - * "show/products", - * [ - * "id" => 1, - * "name" => "Carrots", - * ] + * "show/products", + * [ + * "id" => 1, + * "name" => "Carrots", + * ] * ); + * * // Generate an absolute URL by setting the third parameter as false. * echo $url->get( - * "https://phalconphp.com/", - * null, - * false + * "https://phalconphp.com/", + * null, + * false * ); * * - * @param mixed $uri - * @param mixed $args - * @param mixed $local - * @param mixed $baseUri - * @return string + * @param mixed $uri + * @param mixed $args + * @param mixed $local + * @param mixed $baseUri + * @return string */ public function get($uri = null, $args = null, $local = null, $baseUri = null) {} /** * Generates a URL for a static resource + * * * // Generate a URL for a static resource * echo $url->getStatic("img/logo.png"); + * * // Generate a URL for a static predefined route * echo $url->getStatic( - * [ - * "for" => "logo-cdn", - * ] + * [ + * "for" => "logo-cdn", + * ] * ); * * - * @param mixed $uri - * @return string + * @param mixed $uri + * @return string */ public function getStatic($uri = null) {} /** * Generates a local path * - * @param string $path - * @return string + * @param string $path + * @return string */ public function path($path = null) {} diff --git a/ide/stubs/Phalcon/mvc/UrlInterface.php b/ide/stubs/Phalcon/mvc/UrlInterface.php index 9d35e888c..d801ad7be 100644 --- a/ide/stubs/Phalcon/mvc/UrlInterface.php +++ b/ide/stubs/Phalcon/mvc/UrlInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\UrlInterface + * * Interface for Phalcon\Mvc\UrlInterface */ interface UrlInterface @@ -12,47 +13,49 @@ interface UrlInterface /** * Sets a prefix to all the urls generated * - * @param string $baseUri + * @param string $baseUri */ public function setBaseUri($baseUri); /** * Returns the prefix for all the generated urls. By default / * - * @return string + * @return string */ public function getBaseUri(); /** * Sets a base paths for all the generated paths * - * @param string $basePath + * @param string $basePath */ public function setBasePath($basePath); /** * Returns a base path * - * @return string + * @return string */ public function getBasePath(); /** * Generates a URL * - * @param string|array $uri + * + * @param string|array $uri * @param array|object $args Optional arguments to be appended to the query string - * @param bool $local - * @param bool $$local - * @return string + * @param bool $local + * @param bool $$local + * @return string */ public function get($uri = null, $args = null, $local = null); /** * Generates a local path * - * @param string $path - * @return string + * + * @param string $path + * @return string */ public function path($path = null); diff --git a/ide/stubs/Phalcon/mvc/View.php b/ide/stubs/Phalcon/mvc/View.php index d22423ef7..be587e61f 100644 --- a/ide/stubs/Phalcon/mvc/View.php +++ b/ide/stubs/Phalcon/mvc/View.php @@ -4,18 +4,25 @@ /** * Phalcon\Mvc\View + * * Phalcon\Mvc\View is a class for working with the "view" portion of the model-view-controller pattern. * That is, it exists to help keep the view script separate from the model and controller scripts. * It provides a system of helpers, output filters, and variable escaping. + * * * use Phalcon\Mvc\View; + * * $view = new View(); + * * // Setting views directory * $view->setViewsDir("app/views/"); + * * $view->start(); + * * // Shows recent posts view (app/views/posts/recent.phtml) * $view->render("posts", "recent"); * $view->finish(); + * * // Printing views output * echo $view->getContent(); * @@ -24,21 +31,25 @@ class View extends \Phalcon\Di\Injectable implements \Phalcon\Mvc\ViewInterface { /** * Render Level: To the main layout + * */ const LEVEL_MAIN_LAYOUT = 5; /** * Render Level: Render to the templates "after" + * */ const LEVEL_AFTER_TEMPLATE = 4; /** * Render Level: To the controller layout + * */ const LEVEL_LAYOUT = 3; /** * Render Level: To the templates "before" + * */ const LEVEL_BEFORE_TEMPLATE = 2; @@ -49,6 +60,7 @@ class View extends \Phalcon\Di\Injectable implements \Phalcon\Mvc\ViewInterface /** * Render Level: No render any view + * */ const LEVEL_NO_RENDER = 0; @@ -142,21 +154,21 @@ public function getRenderLevel() {} public function getCurrentRenderLevel() {} /** - * @return array + * @return array */ public function getRegisteredEngines() {} /** * Phalcon\Mvc\View constructor * - * @param array $options + * @param array $options */ public function __construct(array $options = array()) {} /** * Checks if a path is absolute or not * - * @param string $path + * @param string $path */ protected final function _isAbsolutePath($path) {} @@ -164,526 +176,554 @@ protected final function _isAbsolutePath($path) {} * Sets the views directory. Depending of your platform, * always add a trailing slash or backslash * - * @param mixed $viewsDir - * @return View + * @param mixed $viewsDir + * @return View */ public function setViewsDir($viewsDir) {} /** * Gets views directory * - * @return string|array + * @return string|array */ public function getViewsDir() {} /** * Sets the layouts sub-directory. Must be a directory under the views directory. * Depending of your platform, always add a trailing slash or backslash + * * * $view->setLayoutsDir("../common/layouts/"); * * - * @param string $layoutsDir - * @return View + * @param string $layoutsDir + * @return View */ public function setLayoutsDir($layoutsDir) {} /** * Gets the current layouts sub-directory * - * @return string + * @return string */ public function getLayoutsDir() {} /** * Sets a partials sub-directory. Must be a directory under the views directory. * Depending of your platform, always add a trailing slash or backslash + * * * $view->setPartialsDir("../common/partials/"); * * - * @param string $partialsDir - * @return View + * @param string $partialsDir + * @return View */ public function setPartialsDir($partialsDir) {} /** * Gets the current partials sub-directory * - * @return string + * @return string */ public function getPartialsDir() {} /** * Sets base path. Depending of your platform, always add a trailing slash or backslash + * * - * $view->setBasePath(__DIR__ . "/"); + * $view->setBasePath(__DIR__ . "/"); * * - * @param string $basePath - * @return View + * @param string $basePath + * @return View */ public function setBasePath($basePath) {} /** * Gets base path * - * @return string + * @return string */ public function getBasePath() {} /** * Sets the render level for the view + * * * // Render the view related to the controller only * $this->view->setRenderLevel( - * View::LEVEL_LAYOUT + * View::LEVEL_LAYOUT * ); * * - * @param int $level - * @return View + * @param int $level + * @return View */ public function setRenderLevel($level) {} /** * Disables a specific level of rendering + * * * // Render all levels except ACTION level * $this->view->disableLevel( - * View::LEVEL_ACTION_VIEW + * View::LEVEL_ACTION_VIEW * ); * * - * @param mixed $level - * @return View + * @param mixed $level + * @return View */ public function disableLevel($level) {} /** * Sets default view name. Must be a file without extension in the views directory + * * * // Renders as main view views-dir/base.phtml * $this->view->setMainView("base"); * * - * @param string $viewPath - * @return View + * @param string $viewPath + * @return View */ public function setMainView($viewPath) {} /** * Returns the name of the main view * - * @return string + * @return string */ public function getMainView() {} /** * Change the layout to be used instead of using the name of the latest controller name + * * * $this->view->setLayout("main"); * * - * @param string $layout - * @return View + * @param string $layout + * @return View */ public function setLayout($layout) {} /** * Returns the name of the main view * - * @return string + * @return string */ public function getLayout() {} /** * Sets a template before the controller layout * - * @param mixed $templateBefore - * @return View + * @param mixed $templateBefore + * @return View */ public function setTemplateBefore($templateBefore) {} /** * Resets any "template before" layouts * - * @return View + * @return View */ public function cleanTemplateBefore() {} /** * Sets a "template after" controller layout * - * @param mixed $templateAfter - * @return View + * @param mixed $templateAfter + * @return View */ public function setTemplateAfter($templateAfter) {} /** * Resets any template before layouts * - * @return View + * @return View */ public function cleanTemplateAfter() {} /** * Adds parameters to views (alias of setVar) + * * * $this->view->setParamToView("products", $products); * * - * @param string $key - * @param mixed $value - * @return View + * @param string $key + * @param mixed $value + * @return View */ public function setParamToView($key, $value) {} /** * Set all the render params + * * * $this->view->setVars( - * [ - * "products" => $products, - * ] + * [ + * "products" => $products, + * ] * ); * * - * @param array $params - * @param bool $merge - * @return View + * @param array $params + * @param bool $merge + * @return View */ public function setVars(array $params, $merge = true) {} /** * Set a single view parameter + * * * $this->view->setVar("products", $products); * * - * @param string $key - * @param mixed $value - * @return View + * @param string $key + * @param mixed $value + * @return View */ public function setVar($key, $value) {} /** * Returns a parameter previously set in the view * - * @param string $key + * @param string $key */ public function getVar($key) {} /** * Returns parameters to views * - * @return array + * @return array */ public function getParamsToView() {} /** * Gets the name of the controller rendered * - * @return string + * @return string */ public function getControllerName() {} /** * Gets the name of the action rendered * - * @return string + * @return string */ public function getActionName() {} /** * Gets extra parameters of the action rendered * - * @return array + * @return array */ public function getParams() {} /** * Starts rendering process enabling the output buffering * - * @return View + * @return View */ public function start() {} /** * Loads registered template engines, if none is registered it will use Phalcon\Mvc\View\Engine\Php * - * @return array + * @return array */ protected function _loadTemplateEngines() {} /** * Checks whether view exists on registered extensions and render it * - * @param array $engines - * @param string $viewPath - * @param boolean $silence - * @param boolean $mustClean - * @param mixed $cache - * @param \Phalcon\Cache\BackendInterface $$cache + * + * @param array $engines + * @param string $viewPath + * @param boolean $silence + * @param boolean $mustClean + * @param \Phalcon\Cache\BackendInterface $cache + * @param \Phalcon\Cache\BackendInterface $$cache */ protected function _engineRender($engines, $viewPath, $silence, $mustClean, \Phalcon\Cache\BackendInterface $cache = null) {} /** * Register templating engines + * * * $this->view->registerEngines( - * [ - * ".phtml" => "Phalcon\\Mvc\\View\\Engine\\Php", - * ".volt" => "Phalcon\\Mvc\\View\\Engine\\Volt", - * ".mhtml" => "MyCustomEngine", - * ] + * [ + * ".phtml" => "Phalcon\\Mvc\\View\\Engine\\Php", + * ".volt" => "Phalcon\\Mvc\\View\\Engine\\Volt", + * ".mhtml" => "MyCustomEngine", + * ] * ); * * - * @param array $engines - * @return View + * @param array $engines + * @return View */ public function registerEngines(array $engines) {} /** * Checks whether view exists * - * @param string $view - * @return bool + * @param string $view + * @return bool */ public function exists($view) {} /** * Executes render process from dispatching data + * * * // Shows recent posts view (app/views/posts/recent.phtml) * $view->start()->render("posts", "recent")->finish(); * * - * @param string $controllerName - * @param string $actionName - * @param array $params - * @return bool|View + * + * @param string $controllerName + * @param string $actionName + * @param array $params + * @return bool|View */ public function render($controllerName, $actionName, $params = null) {} /** * Choose a different view to render instead of last-controller/last-action + * * * use Phalcon\Mvc\Controller; + * * class ProductsController extends Controller * { - * public function saveAction() - * { - * // Do some save stuff... - * // Then show the list view - * $this->view->pick("products/list"); - * } + * public function saveAction() + * { + * // Do some save stuff... + * + * // Then show the list view + * $this->view->pick("products/list"); + * } * } * * - * @param mixed $renderView - * @return View + * @param mixed $renderView + * @return View */ public function pick($renderView) {} /** * Renders a partial view + * * * // Retrieve the contents of a partial * echo $this->getPartial("shared/footer"); * + * * * // Retrieve the contents of a partial with arguments * echo $this->getPartial( - * "shared/footer", - * [ - * "content" => $html, - * ] + * "shared/footer", + * [ + * "content" => $html, + * ] * ); * * - * @param string $partialPath - * @param mixed $params - * @return string + * @param string $partialPath + * @param mixed $params + * @return string */ public function getPartial($partialPath, $params = null) {} /** * Renders a partial view + * * * // Show a partial inside another view * $this->partial("shared/footer"); * + * * * // Show a partial inside another view with parameters * $this->partial( - * "shared/footer", - * [ - * "content" => $html, - * ] + * "shared/footer", + * [ + * "content" => $html, + * ] * ); * * - * @param string $partialPath - * @param mixed $params + * @param string $partialPath + * @param mixed $params */ public function partial($partialPath, $params = null) {} /** * Perform the automatic rendering returning the output as a string + * * * $template = $this->view->getRender( - * "products", - * "show", - * [ - * "products" => $products, - * ] + * "products", + * "show", + * [ + * "products" => $products, + * ] * ); * * - * @param string $controllerName - * @param string $actionName - * @param array $params - * @param mixed $configCallback - * @return string + * + * @param string $controllerName + * @param string $actionName + * @param array $params + * @param mixed $configCallback + * @return string */ public function getRender($controllerName, $actionName, $params = null, $configCallback = null) {} /** * Finishes the render process by stopping the output buffering * - * @return View + * @return View */ public function finish() {} /** * Create a Phalcon\Cache based on the internal cache options * - * @return \Phalcon\Cache\BackendInterface + * @return \Phalcon\Cache\BackendInterface */ protected function _createCache() {} /** * Check if the component is currently caching the output content * - * @return bool + * @return bool */ public function isCaching() {} /** * Returns the cache instance used to cache * - * @return \Phalcon\Cache\BackendInterface + * @return \Phalcon\Cache\BackendInterface */ public function getCache() {} /** * Cache the actual view render to certain level + * * * $this->view->cache( - * [ - * "key" => "my-key", - * "lifetime" => 86400, - * ] + * [ + * "key" => "my-key", + * "lifetime" => 86400, + * ] * ); * * - * @param mixed $options - * @return View + * @param mixed $options + * @return View */ public function cache($options = true) {} /** * Externally sets the view content + * * * $this->view->setContent("

hello

"); *
* - * @param string $content - * @return View + * @param string $content + * @return View */ public function setContent($content) {} /** * Returns cached output from another view stage * - * @return string + * @return string */ public function getContent() {} /** * Returns the path (or paths) of the views that are currently rendered * - * @return string|array + * @return string|array */ public function getActiveRenderPath() {} /** * Disables the auto-rendering process * - * @return View + * @return View */ public function disable() {} /** * Enables the auto-rendering process * - * @return View + * @return View */ public function enable() {} /** * Resets the view component to its factory default values * - * @return View + * @return View */ public function reset() {} /** * Magic method to pass variables to the views + * * * $this->view->products = $products; * * - * @param string $key - * @param mixed $value + * @param string $key + * @param mixed $value */ public function __set($key, $value) {} /** * Magic method to retrieve a variable passed to the view + * * * echo $this->view->products; * * - * @param string $key - * @return mixed|null + * @param string $key + * @return mixed|null */ public function __get($key) {} /** * Whether automatic rendering is enabled * - * @return bool + * @return bool */ public function isDisabled() {} /** * Magic method to retrieve if a variable is set in the view + * * * echo isset($this->view->products); * * - * @param string $key - * @return bool + * @param string $key + * @return bool */ public function __isset($key) {} /** * Gets views directories * - * @return array + * @return array */ protected function getViewsDirs() {} diff --git a/ide/stubs/Phalcon/mvc/ViewBaseInterface.php b/ide/stubs/Phalcon/mvc/ViewBaseInterface.php index c2be89be8..f88562053 100644 --- a/ide/stubs/Phalcon/mvc/ViewBaseInterface.php +++ b/ide/stubs/Phalcon/mvc/ViewBaseInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\ViewInterface + * * Interface for Phalcon\Mvc\View and Phalcon\Mvc\View\Simple */ interface ViewBaseInterface @@ -12,74 +13,75 @@ interface ViewBaseInterface /** * Sets views directory. Depending of your platform, always add a trailing slash or backslash * - * @param string $viewsDir + * @param string $viewsDir */ public function setViewsDir($viewsDir); /** * Gets views directory * - * @return string + * @return string */ public function getViewsDir(); /** * Adds parameters to views (alias of setVar) * - * @param string $key - * @param mixed $value + * @param string $key + * @param mixed $value */ public function setParamToView($key, $value); /** * Adds parameters to views * - * @param string $key - * @param mixed $value + * + * @param string $key + * @param mixed $value */ public function setVar($key, $value); /** * Returns parameters to views * - * @return array + * @return array */ public function getParamsToView(); /** * Returns the cache instance used to cache * - * @return \Phalcon\Cache\BackendInterface + * @return \Phalcon\Cache\BackendInterface */ public function getCache(); /** * Cache the actual view render to certain level * - * @param mixed $options + * @param mixed $options */ public function cache($options = true); /** * Externally sets the view content * - * @param string $content + * @param string $content */ public function setContent($content); /** * Returns cached output from another view stage * - * @return string + * @return string */ public function getContent(); /** * Renders a partial view * - * @param string $partialPath - * @param mixed $params - * @return string + * @param string $partialPath + * @param mixed $params + * @return string */ public function partial($partialPath, $params = null); diff --git a/ide/stubs/Phalcon/mvc/ViewInterface.php b/ide/stubs/Phalcon/mvc/ViewInterface.php index b1adc1bff..7bc669ecb 100644 --- a/ide/stubs/Phalcon/mvc/ViewInterface.php +++ b/ide/stubs/Phalcon/mvc/ViewInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\ViewInterface + * * Interface for Phalcon\Mvc\View */ interface ViewInterface extends \Phalcon\Mvc\ViewBaseInterface @@ -13,14 +14,14 @@ interface ViewInterface extends \Phalcon\Mvc\ViewBaseInterface * Sets the layouts sub-directory. Must be a directory under the views * directory. Depending of your platform, always add a trailing slash or backslash * - * @param string $layoutsDir + * @param string $layoutsDir */ public function setLayoutsDir($layoutsDir); /** * Gets the current layouts sub-directory * - * @return string + * @return string */ public function getLayoutsDir(); @@ -28,70 +29,71 @@ public function getLayoutsDir(); * Sets a partials sub-directory. Must be a directory under the views * directory. Depending of your platform, always add a trailing slash or backslash * - * @param string $partialsDir + * @param string $partialsDir */ public function setPartialsDir($partialsDir); /** * Gets the current partials sub-directory * - * @return string + * @return string */ public function getPartialsDir(); /** * Sets base path. Depending of your platform, always add a trailing slash or backslash * - * @param string $basePath + * @param string $basePath */ public function setBasePath($basePath); /** * Gets base path * - * @return string + * @return string */ public function getBasePath(); /** * Sets the render level for the view * - * @param string $level + * @param string $level */ public function setRenderLevel($level); /** * Sets default view name. Must be a file without extension in the views directory * - * @param string $viewPath + * @param string $viewPath */ public function setMainView($viewPath); /** * Returns the name of the main view * - * @return string + * @return string */ public function getMainView(); /** * Change the layout to be used instead of using the name of the latest controller name * - * @param string $layout + * @param string $layout */ public function setLayout($layout); /** * Returns the name of the main view * - * @return string + * @return string */ public function getLayout(); /** * Appends template before controller layout * - * @param string|array $templateBefore + * + * @param string|array $templateBefore */ public function setTemplateBefore($templateBefore); @@ -103,7 +105,8 @@ public function cleanTemplateBefore(); /** * Appends template after controller layout * - * @param string|array $templateAfter + * + * @param string|array $templateAfter */ public function setTemplateAfter($templateAfter); @@ -115,21 +118,21 @@ public function cleanTemplateAfter(); /** * Gets the name of the controller rendered * - * @return string + * @return string */ public function getControllerName(); /** * Gets the name of the action rendered * - * @return string + * @return string */ public function getActionName(); /** * Gets extra parameters of the action rendered * - * @return array + * @return array */ public function getParams(); @@ -141,23 +144,24 @@ public function start(); /** * Register templating engines * - * @param array $engines + * @param array $engines */ public function registerEngines(array $engines); /** * Executes render process from dispatching data * - * @param string $controllerName - * @param string $actionName - * @param array $params + * + * @param string $controllerName + * @param string $actionName + * @param array $params */ public function render($controllerName, $actionName, $params = null); /** * Choose a view different to render than last-controller/last-action * - * @param string $renderView + * @param string $renderView */ public function pick($renderView); @@ -169,7 +173,7 @@ public function finish(); /** * Returns the path of the view that is currently rendered * - * @return string + * @return string */ public function getActiveRenderPath(); @@ -191,7 +195,7 @@ public function reset(); /** * Whether the automatic rendering is disabled * - * @return bool + * @return bool */ public function isDisabled(); diff --git a/ide/stubs/Phalcon/mvc/application/Exception.php b/ide/stubs/Phalcon/mvc/application/Exception.php index 9acf829f9..09fd0a897 100644 --- a/ide/stubs/Phalcon/mvc/application/Exception.php +++ b/ide/stubs/Phalcon/mvc/application/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Application\Exception + * * Exceptions thrown in Phalcon\Mvc\Application class will use this class */ class Exception extends \Phalcon\Application\Exception diff --git a/ide/stubs/Phalcon/mvc/collection/Behavior.php b/ide/stubs/Phalcon/mvc/collection/Behavior.php index ff89571bf..1c5b8d258 100644 --- a/ide/stubs/Phalcon/mvc/collection/Behavior.php +++ b/ide/stubs/Phalcon/mvc/collection/Behavior.php @@ -4,9 +4,10 @@ /** * Phalcon\Mvc\Collection\Behavior + * * This is an optional base class for ORM behaviors */ -abstract class Behavior +abstract class Behavior implements \Phalcon\Mvc\Collection\BehaviorInterface { protected $_options; @@ -15,40 +16,42 @@ abstract class Behavior /** * Phalcon\Mvc\Collection\Behavior * - * @param array $options + * + * @param array $options */ public function __construct($options = null) {} /** * Checks whether the behavior must take action on certain event * - * @param string $eventName - * @return bool + * @param string $eventName + * @return bool */ protected function mustTakeAction($eventName) {} /** * Returns the behavior options related to an event * - * @param string $eventName - * @return array + * + * @param string $eventName + * @return array */ protected function getOptions($eventName = null) {} /** * This method receives the notifications from the EventsManager * - * @param string $type - * @param mixed $model + * @param string $type + * @param \Phalcon\Mvc\CollectionInterface $model */ public function notify($type, \Phalcon\Mvc\CollectionInterface $model) {} /** * Acts as fallbacks when a missing method is called on the collection * - * @param mixed $model - * @param string $method - * @param mixed $arguments + * @param \Phalcon\Mvc\CollectionInterface $model + * @param string $method + * @param mixed $arguments */ public function missingMethod(\Phalcon\Mvc\CollectionInterface $model, $method, $arguments = null) {} diff --git a/ide/stubs/Phalcon/mvc/collection/BehaviorInterface.php b/ide/stubs/Phalcon/mvc/collection/BehaviorInterface.php index 0203797ed..a3d877ba2 100644 --- a/ide/stubs/Phalcon/mvc/collection/BehaviorInterface.php +++ b/ide/stubs/Phalcon/mvc/collection/BehaviorInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Collection\BehaviorInterface + * * Interface for Phalcon\Mvc\Collection\Behavior */ interface BehaviorInterface @@ -12,17 +13,17 @@ interface BehaviorInterface /** * This method receives the notifications from the EventsManager * - * @param string $type - * @param mixed $collection + * @param string $type + * @param \Phalcon\Mvc\CollectionInterface $collection */ public function notify($type, \Phalcon\Mvc\CollectionInterface $collection); /** * Calls a method when it's missing in the collection * - * @param mixed $collection - * @param string $method - * @param mixed $arguments + * @param \Phalcon\Mvc\CollectionInterface $collection + * @param string $method + * @param mixed $arguments */ public function missingMethod(\Phalcon\Mvc\CollectionInterface $collection, $method, $arguments = null); diff --git a/ide/stubs/Phalcon/mvc/collection/Document.php b/ide/stubs/Phalcon/mvc/collection/Document.php index a51d7438d..f1e242cd9 100644 --- a/ide/stubs/Phalcon/mvc/collection/Document.php +++ b/ide/stubs/Phalcon/mvc/collection/Document.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Collection\Document + * * This component allows Phalcon\Mvc\Collection to return rows without an associated entity. * This objects implements the ArrayAccess interface to allow access the object as object->x or array[x]. */ @@ -13,59 +14,66 @@ class Document implements \Phalcon\Mvc\EntityInterface, \ArrayAccess /** * Checks whether an offset exists in the document * - * @param int $index - * @return boolean + * + * @param int $index + * @return bool */ public function offsetExists($index) {} /** * Returns the value of a field using the ArrayAccess interfase * - * @param string $index + * @param string $index */ public function offsetGet($index) {} /** * Change a value using the ArrayAccess interface * - * @param string $index - * @param mixed $value + * @param string $index + * @param mixed $value */ public function offsetSet($index, $value) {} /** * Rows cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface * - * @param string $offset + * + * @param string $offset */ public function offsetUnset($offset) {} /** * Reads an attribute value by its name + * * - * echo $robot->readAttribute("name"); + * echo $robot->readAttribute("name"); * * - * @param string $attribute - * @return mixed + * + * @param string $attribute + * @return mixed */ public function readAttribute($attribute) {} /** * Writes an attribute value by its name + * * - * $robot->writeAttribute("name", "Rosey"); + * $robot->writeAttribute("name", "Rosey"); * * - * @param string $attribute - * @param mixed $value + * + * @param string $attribute + * @param mixed $value */ public function writeAttribute($attribute, $value) {} /** * Returns the instance as an array representation * - * @return array + * + * @return array */ public function toArray() {} diff --git a/ide/stubs/Phalcon/mvc/collection/Exception.php b/ide/stubs/Phalcon/mvc/collection/Exception.php index 736016ca9..ae4a8b1f6 100644 --- a/ide/stubs/Phalcon/mvc/collection/Exception.php +++ b/ide/stubs/Phalcon/mvc/collection/Exception.php @@ -4,7 +4,9 @@ /** * Phalcon\Mvc\Collection\Exception - * Exceptions thrown in Phalcon\Mvc\Collection\* classes will use this class + * + * Exceptions thrown in Phalcon\Mvc\Collection\ classes will use this class + * */ class Exception extends \Phalcon\Exception { diff --git a/ide/stubs/Phalcon/mvc/collection/Manager.php b/ide/stubs/Phalcon/mvc/collection/Manager.php index b24493f81..1d7fbfd9c 100644 --- a/ide/stubs/Phalcon/mvc/collection/Manager.php +++ b/ide/stubs/Phalcon/mvc/collection/Manager.php @@ -4,17 +4,22 @@ /** * Phalcon\Mvc\Collection\Manager + * * This components controls the initialization of models, keeping record of relations * between the different models of the application. + * * A CollectionManager is injected to a model via a Dependency Injector Container such as Phalcon\Di. + * * * $di = new \Phalcon\Di(); + * * $di->set( - * "collectionManager", - * function () { - * return new \Phalcon\Mvc\Collection\Manager(); - * } + * "collectionManager", + * function () { + * return new \Phalcon\Mvc\Collection\Manager(); + * } * ); + * * $robot = new Robots($di); * */ @@ -52,114 +57,115 @@ class Manager implements \Phalcon\Di\InjectionAwareInterface, \Phalcon\Events\Ev public function getServiceName() {} /** - * @param mixed $serviceName + * @param mixed $serviceName */ public function setServiceName($serviceName) {} /** * Sets the DependencyInjector container * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the DependencyInjector container * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI() {} /** * Sets the event manager * - * @param mixed $eventsManager + * @param \Phalcon\Events\ManagerInterface $eventsManager */ public function setEventsManager(\Phalcon\Events\ManagerInterface $eventsManager) {} /** * Returns the internal event manager * - * @return \Phalcon\Events\ManagerInterface + * @return \Phalcon\Events\ManagerInterface */ public function getEventsManager() {} /** * Sets a custom events manager for a specific model * - * @param mixed $model - * @param mixed $eventsManager + * @param \Phalcon\Mvc\CollectionInterface $model + * @param \Phalcon\Events\ManagerInterface $eventsManager */ public function setCustomEventsManager(\Phalcon\Mvc\CollectionInterface $model, \Phalcon\Events\ManagerInterface $eventsManager) {} /** * Returns a custom events manager related to a model * - * @param mixed $model - * @return mixed|null + * @param \Phalcon\Mvc\CollectionInterface $model + * @return mixed|null */ public function getCustomEventsManager(\Phalcon\Mvc\CollectionInterface $model) {} /** * Initializes a model in the models manager * - * @param mixed $model + * @param \Phalcon\Mvc\CollectionInterface $model */ public function initialize(\Phalcon\Mvc\CollectionInterface $model) {} /** * Check whether a model is already initialized * - * @param string $modelName - * @return bool + * @param string $modelName + * @return bool */ public function isInitialized($modelName) {} /** * Get the latest initialized model * - * @return \Phalcon\Mvc\CollectionInterface + * @return \Phalcon\Mvc\CollectionInterface */ public function getLastInitialized() {} /** * Sets a connection service for a specific model * - * @param mixed $model - * @param string $connectionService + * @param \Phalcon\Mvc\CollectionInterface $model + * @param string $connectionService */ public function setConnectionService(\Phalcon\Mvc\CollectionInterface $model, $connectionService) {} /** * Gets a connection service for a specific model * - * @param mixed $model - * @return string + * @param \Phalcon\Mvc\CollectionInterface $model + * @return string */ public function getConnectionService(\Phalcon\Mvc\CollectionInterface $model) {} /** * Sets whether a model must use implicit objects ids * - * @param mixed $model - * @param bool $useImplicitObjectIds + * @param \Phalcon\Mvc\CollectionInterface $model + * @param bool $useImplicitObjectIds */ public function useImplicitObjectIds(\Phalcon\Mvc\CollectionInterface $model, $useImplicitObjectIds) {} /** * Checks if a model is using implicit object ids * - * @param mixed $model - * @return bool + * @param \Phalcon\Mvc\CollectionInterface $model + * @return bool */ public function isUsingImplicitObjectIds(\Phalcon\Mvc\CollectionInterface $model) {} /** * Returns the connection related to a model * - * @param mixed $model - * @param \Phalcon\Mvc\CollectionInterface $$model - * @return \Mongo + * + * @param \Phalcon\Mvc\CollectionInterface $model + * @param \Phalcon\Mvc\CollectionInterface $$model + * @return \Mongo */ public function getConnection(\Phalcon\Mvc\CollectionInterface $model) {} @@ -167,8 +173,8 @@ public function getConnection(\Phalcon\Mvc\CollectionInterface $model) {} * Receives events generated in the models and dispatches them to an events-manager if available * Notify the behaviors that are listening in the model * - * @param string $eventName - * @param mixed $model + * @param string $eventName + * @param \Phalcon\Mvc\CollectionInterface $model */ public function notifyEvent($eventName, \Phalcon\Mvc\CollectionInterface $model) {} @@ -177,18 +183,18 @@ public function notifyEvent($eventName, \Phalcon\Mvc\CollectionInterface $model) * This method expects that the endpoint listeners/behaviors returns true * meaning that at least one was implemented * - * @param mixed $model - * @param string $eventName - * @param mixed $data - * @return bool + * @param \Phalcon\Mvc\CollectionInterface $model + * @param string $eventName + * @param mixed $data + * @return bool */ public function missingMethod(\Phalcon\Mvc\CollectionInterface $model, $eventName, $data) {} /** * Binds a behavior to a model * - * @param mixed $model - * @param mixed $behavior + * @param \Phalcon\Mvc\CollectionInterface $model + * @param \Phalcon\Mvc\Collection\BehaviorInterface $behavior */ public function addBehavior(\Phalcon\Mvc\CollectionInterface $model, \Phalcon\Mvc\Collection\BehaviorInterface $behavior) {} diff --git a/ide/stubs/Phalcon/mvc/collection/ManagerInterface.php b/ide/stubs/Phalcon/mvc/collection/ManagerInterface.php index 65596652a..da8edc32a 100644 --- a/ide/stubs/Phalcon/mvc/collection/ManagerInterface.php +++ b/ide/stubs/Phalcon/mvc/collection/ManagerInterface.php @@ -4,17 +4,22 @@ /** * Phalcon\Mvc\Collection\Manager + * * This components controls the initialization of models, keeping record of relations * between the different models of the application. + * * A CollectionManager is injected to a model via a Dependency Injector Container such as Phalcon\Di. + * * * $di = new \Phalcon\Di(); + * * $di->set( - * "collectionManager", - * function() { - * return new \Phalcon\Mvc\Collection\Manager(); - * } + * "collectionManager", + * function() { + * return new \Phalcon\Mvc\Collection\Manager(); + * } * ); + * * $robot = new Robots(di); * */ @@ -24,70 +29,70 @@ interface ManagerInterface /** * Sets a custom events manager for a specific model * - * @param mixed $model - * @param mixed $eventsManager + * @param \Phalcon\Mvc\CollectionInterface $model + * @param \Phalcon\Events\ManagerInterface $eventsManager */ public function setCustomEventsManager(\Phalcon\Mvc\CollectionInterface $model, \Phalcon\Events\ManagerInterface $eventsManager); /** * Returns a custom events manager related to a model * - * @param mixed $model - * @return \Phalcon\Events\ManagerInterface + * @param \Phalcon\Mvc\CollectionInterface $model + * @return \Phalcon\Events\ManagerInterface */ public function getCustomEventsManager(\Phalcon\Mvc\CollectionInterface $model); /** * Initializes a model in the models manager * - * @param mixed $model + * @param \Phalcon\Mvc\CollectionInterface $model */ public function initialize(\Phalcon\Mvc\CollectionInterface $model); /** * Check whether a model is already initialized * - * @param string $modelName - * @return bool + * @param string $modelName + * @return bool */ public function isInitialized($modelName); /** * Get the latest initialized model * - * @return \Phalcon\Mvc\CollectionInterface + * @return \Phalcon\Mvc\CollectionInterface */ public function getLastInitialized(); /** * Sets a connection service for a specific model * - * @param mixed $model - * @param string $connectionService + * @param \Phalcon\Mvc\CollectionInterface $model + * @param string $connectionService */ public function setConnectionService(\Phalcon\Mvc\CollectionInterface $model, $connectionService); /** * Sets if a model must use implicit objects ids * - * @param mixed $model - * @param bool $useImplicitObjectIds + * @param \Phalcon\Mvc\CollectionInterface $model + * @param bool $useImplicitObjectIds */ public function useImplicitObjectIds(\Phalcon\Mvc\CollectionInterface $model, $useImplicitObjectIds); /** * Checks if a model is using implicit object ids * - * @param mixed $model - * @return bool + * @param \Phalcon\Mvc\CollectionInterface $model + * @return bool */ public function isUsingImplicitObjectIds(\Phalcon\Mvc\CollectionInterface $model); /** * Returns the connection related to a model * - * @param mixed $model - * @return \Phalcon\Db\AdapterInterface + * @param \Phalcon\Mvc\CollectionInterface $model + * @return \Phalcon\Db\AdapterInterface */ public function getConnection(\Phalcon\Mvc\CollectionInterface $model); @@ -95,16 +100,16 @@ public function getConnection(\Phalcon\Mvc\CollectionInterface $model); * Receives events generated in the models and dispatches them to an events-manager if available * Notify the behaviors that are listening in the model * - * @param string $eventName - * @param mixed $model + * @param string $eventName + * @param \Phalcon\Mvc\CollectionInterface $model */ public function notifyEvent($eventName, \Phalcon\Mvc\CollectionInterface $model); /** * Binds a behavior to a collection * - * @param mixed $model - * @param mixed $behavior + * @param \Phalcon\Mvc\CollectionInterface $model + * @param \Phalcon\Mvc\Collection\BehaviorInterface $behavior */ public function addBehavior(\Phalcon\Mvc\CollectionInterface $model, \Phalcon\Mvc\Collection\BehaviorInterface $behavior); diff --git a/ide/stubs/Phalcon/mvc/collection/behavior/SoftDelete.php b/ide/stubs/Phalcon/mvc/collection/behavior/SoftDelete.php index 527ee606b..596212498 100644 --- a/ide/stubs/Phalcon/mvc/collection/behavior/SoftDelete.php +++ b/ide/stubs/Phalcon/mvc/collection/behavior/SoftDelete.php @@ -4,17 +4,18 @@ /** * Phalcon\Mvc\Collection\Behavior\SoftDelete + * * Instead of permanently delete a record it marks the record as * deleted changing the value of a flag column */ -class SoftDelete extends \Phalcon\Mvc\Collection\Behavior implements \Phalcon\Mvc\Collection\BehaviorInterface +class SoftDelete extends \Phalcon\Mvc\Collection\Behavior { /** * Listens for notifications from the models manager * - * @param string $type - * @param mixed $model + * @param string $type + * @param \Phalcon\Mvc\CollectionInterface $model */ public function notify($type, \Phalcon\Mvc\CollectionInterface $model) {} diff --git a/ide/stubs/Phalcon/mvc/collection/behavior/Timestampable.php b/ide/stubs/Phalcon/mvc/collection/behavior/Timestampable.php index a54d13677..d98039817 100644 --- a/ide/stubs/Phalcon/mvc/collection/behavior/Timestampable.php +++ b/ide/stubs/Phalcon/mvc/collection/behavior/Timestampable.php @@ -4,17 +4,18 @@ /** * Phalcon\Mvc\Collection\Behavior\Timestampable + * * Allows to automatically update a model’s attribute saving the * datetime when a record is created or updated */ -class Timestampable extends \Phalcon\Mvc\Collection\Behavior implements \Phalcon\Mvc\Collection\BehaviorInterface +class Timestampable extends \Phalcon\Mvc\Collection\Behavior { /** * Listens for notifications from the models manager * - * @param string $type - * @param mixed $model + * @param string $type + * @param \Phalcon\Mvc\CollectionInterface $model */ public function notify($type, \Phalcon\Mvc\CollectionInterface $model) {} diff --git a/ide/stubs/Phalcon/mvc/controller/BindModelInterface.php b/ide/stubs/Phalcon/mvc/controller/BindModelInterface.php index c4b874e9c..b1855167b 100644 --- a/ide/stubs/Phalcon/mvc/controller/BindModelInterface.php +++ b/ide/stubs/Phalcon/mvc/controller/BindModelInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Controller\BindModelInterface + * * Interface for Phalcon\Mvc\Controller */ interface BindModelInterface @@ -12,7 +13,8 @@ interface BindModelInterface /** * Return the model name associated with this controller * - * @return string + * + * @return string */ abstract static function getModelName(); diff --git a/ide/stubs/Phalcon/mvc/dispatcher/Exception.php b/ide/stubs/Phalcon/mvc/dispatcher/Exception.php index 64660c6e4..685af95f7 100644 --- a/ide/stubs/Phalcon/mvc/dispatcher/Exception.php +++ b/ide/stubs/Phalcon/mvc/dispatcher/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Dispatcher\Exception + * * Exceptions thrown in Phalcon\Mvc\Dispatcher will use this class */ class Exception extends \Phalcon\Exception diff --git a/ide/stubs/Phalcon/mvc/micro/Collection.php b/ide/stubs/Phalcon/mvc/micro/Collection.php index 02129640e..fc1450471 100644 --- a/ide/stubs/Phalcon/mvc/micro/Collection.php +++ b/ide/stubs/Phalcon/mvc/micro/Collection.php @@ -4,14 +4,20 @@ /** * Phalcon\Mvc\Micro\Collection + * * Groups Micro-Mvc handlers as controllers + * * * $app = new \Phalcon\Mvc\Micro(); + * * $collection = new Collection(); + * * $collection->setHandler( - * new PostsController() + * new PostsController() * ); + * * $collection->get("/posts/edit/{id}", "edit"); + * * $app->mount($collection); * */ @@ -33,143 +39,155 @@ class Collection implements \Phalcon\Mvc\Micro\CollectionInterface /** * Internal function to add a handler to the group * - * @param string|array $method - * @param string $routePattern - * @param mixed $handler - * @param string $name + * + * @param string|array $method + * @param string $routePattern + * @param mixed $handler + * @param string $name */ protected function _addMap($method, $routePattern, $handler, $name) {} /** * Sets a prefix for all routes added to the collection * - * @param string $prefix - * @return Collection + * @param string $prefix + * @return Collection */ public function setPrefix($prefix) {} /** * Returns the collection prefix if any * - * @return string + * @return string */ public function getPrefix() {} /** * Returns the registered handlers * - * @return array + * + * @return array */ public function getHandlers() {} /** * Sets the main handler * - * @param mixed $handler - * @param boolean $lazy - * @return \Phalcon\Mvc\Micro\Collection + * + * @param mixed $handler + * @param boolean $lazy + * @return Collection */ public function setHandler($handler, $lazy = false) {} /** * Sets if the main handler must be lazy loaded * - * @param bool $lazy - * @return Collection + * @param bool $lazy + * @return Collection */ public function setLazy($lazy) {} /** * Returns if the main handler must be lazy loaded * - * @return bool + * @return bool */ public function isLazy() {} /** * Returns the main handler * - * @return mixed + * + * @return mixed */ public function getHandler() {} /** * Maps a route to a handler * - * @param string $routePattern - * @param callable $handler - * @param string $name - * @return \Phalcon\Mvc\Micro\Collection + * + * @param string $routePattern + * @param callable $handler + * @param string $name + * @return Collection */ public function map($routePattern, $handler, $name = null) {} /** * Maps a route to a handler that only matches if the HTTP method is GET * - * @param string $routePattern - * @param callable $handler - * @param string $name - * @return \Phalcon\Mvc\Micro\Collection + * + * @param string $routePattern + * @param callable $handler + * @param string $name + * @return Collection */ public function get($routePattern, $handler, $name = null) {} /** * Maps a route to a handler that only matches if the HTTP method is POST * - * @param string $routePattern - * @param callable $handler - * @param string $name - * @return \Phalcon\Mvc\Micro\Collection + * + * @param string $routePattern + * @param callable $handler + * @param string $name + * @return Collection */ public function post($routePattern, $handler, $name = null) {} /** * Maps a route to a handler that only matches if the HTTP method is PUT * - * @param string $routePattern - * @param callable $handler - * @param string $name - * @return \Phalcon\Mvc\Micro\Collection + * + * @param string $routePattern + * @param callable $handler + * @param string $name + * @return Collection */ public function put($routePattern, $handler, $name = null) {} /** * Maps a route to a handler that only matches if the HTTP method is PATCH * - * @param string $routePattern - * @param callable $handler - * @param string $name - * @return \Phalcon\Mvc\Micro\Collection + * + * @param string $routePattern + * @param callable $handler + * @param string $name + * @return Collection */ public function patch($routePattern, $handler, $name = null) {} /** * Maps a route to a handler that only matches if the HTTP method is HEAD * - * @param string $routePattern - * @param callable $handler - * @param string $name - * @return \Phalcon\Mvc\Micro\Collection + * + * @param string $routePattern + * @param callable $handler + * @param string $name + * @return Collection */ public function head($routePattern, $handler, $name = null) {} /** * Maps a route to a handler that only matches if the HTTP method is DELETE * - * @param string $routePattern - * @param callable $handler - * @param string $name - * @return \Phalcon\Mvc\Micro\Collection + * + * @param string $routePattern + * @param callable $handler + * @param string $name + * @return Collection */ public function delete($routePattern, $handler, $name = null) {} /** * Maps a route to a handler that only matches if the HTTP method is OPTIONS * - * @param string $routePattern - * @param callable $handler - * @param mixed $name - * @return \Phalcon\Mvc\Micro\Collection + * + * @param string $routePattern + * @param callable $handler + * @param mixed $name + * @return Collection */ public function options($routePattern, $handler, $name = null) {} diff --git a/ide/stubs/Phalcon/mvc/micro/CollectionInterface.php b/ide/stubs/Phalcon/mvc/micro/CollectionInterface.php index 30c219445..33f4d3dc6 100644 --- a/ide/stubs/Phalcon/mvc/micro/CollectionInterface.php +++ b/ide/stubs/Phalcon/mvc/micro/CollectionInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Micro\CollectionInterface + * * Interface for Phalcon\Mvc\Micro\Collection */ interface CollectionInterface @@ -12,133 +13,144 @@ interface CollectionInterface /** * Sets a prefix for all routes added to the collection * - * @param string $prefix - * @return CollectionInterface + * @param string $prefix + * @return CollectionInterface */ public function setPrefix($prefix); /** * Returns the collection prefix if any * - * @return string + * @return string */ public function getPrefix(); /** * Returns the registered handlers * - * @return array + * + * @return array */ public function getHandlers(); /** * Sets the main handler * - * @param mixed $handler - * @param boolean $lazy - * @return \Phalcon\Mvc\Micro\Collection + * + * @param mixed $handler + * @param boolean $lazy + * @return \Phalcon\Mvc\Micro\Collection */ public function setHandler($handler, $lazy = false); /** * Sets if the main handler must be lazy loaded * - * @param bool $lazy - * @return CollectionInterface + * @param bool $lazy + * @return CollectionInterface */ public function setLazy($lazy); /** * Returns if the main handler must be lazy loaded * - * @return bool + * @return bool */ public function isLazy(); /** * Returns the main handler * - * @return mixed + * + * @return mixed */ public function getHandler(); /** * Maps a route to a handler * - * @param string $routePattern - * @param callable $handler - * @param string $name - * @return \Phalcon\Mvc\Router\RouteInterface + * + * @param string $routePattern + * @param callable $handler + * @param string $name + * @return \Phalcon\Mvc\Router\RouteInterface */ public function map($routePattern, $handler, $name = null); /** * Maps a route to a handler that only matches if the HTTP method is GET * - * @param string $routePattern - * @param callable $handler - * @param string $name - * @return \Phalcon\Mvc\Router\RouteInterface + * + * @param string $routePattern + * @param callable $handler + * @param string $name + * @return \Phalcon\Mvc\Router\RouteInterface */ public function get($routePattern, $handler, $name = null); /** * Maps a route to a handler that only matches if the HTTP method is POST * - * @param string $routePattern - * @param callable $handler - * @param string $name - * @return \Phalcon\Mvc\Router\RouteInterface + * + * @param string $routePattern + * @param callable $handler + * @param string $name + * @return \Phalcon\Mvc\Router\RouteInterface */ public function post($routePattern, $handler, $name = null); /** * Maps a route to a handler that only matches if the HTTP method is PUT * - * @param string $routePattern - * @param callable $handler - * @param string $name - * @return \Phalcon\Mvc\Router\RouteInterface + * + * @param string $routePattern + * @param callable $handler + * @param string $name + * @return \Phalcon\Mvc\Router\RouteInterface */ public function put($routePattern, $handler, $name = null); /** * Maps a route to a handler that only matches if the HTTP method is PATCH * - * @param string $routePattern - * @param callable $handler - * @param string $name - * @return \Phalcon\Mvc\Router\RouteInterface + * + * @param string $routePattern + * @param callable $handler + * @param string $name + * @return \Phalcon\Mvc\Router\RouteInterface */ public function patch($routePattern, $handler, $name = null); /** * Maps a route to a handler that only matches if the HTTP method is HEAD * - * @param string $routePattern - * @param callable $handler - * @param string $name - * @return \Phalcon\Mvc\Router\RouteInterface + * + * @param string $routePattern + * @param callable $handler + * @param string $name + * @return \Phalcon\Mvc\Router\RouteInterface */ public function head($routePattern, $handler, $name = null); /** * Maps a route to a handler that only matches if the HTTP method is DELETE * - * @param string $routePattern - * @param callable $handler - * @param string $name - * @return \Phalcon\Mvc\Router\RouteInterface + * + * @param string $routePattern + * @param callable $handler + * @param string $name + * @return \Phalcon\Mvc\Router\RouteInterface */ public function delete($routePattern, $handler, $name = null); /** * Maps a route to a handler that only matches if the HTTP method is OPTIONS * - * @param string $routePattern - * @param callable $handler - * @param string $name - * @return \Phalcon\Mvc\Router\RouteInterface + * + * @param string $routePattern + * @param callable $handler + * @param string $name + * @return \Phalcon\Mvc\Router\RouteInterface */ public function options($routePattern, $handler, $name = null); diff --git a/ide/stubs/Phalcon/mvc/micro/Exception.php b/ide/stubs/Phalcon/mvc/micro/Exception.php index 608e755c6..9576ee6bd 100644 --- a/ide/stubs/Phalcon/mvc/micro/Exception.php +++ b/ide/stubs/Phalcon/mvc/micro/Exception.php @@ -4,7 +4,9 @@ /** * Phalcon\Mvc\Micro\Exception + * * Exceptions thrown in Phalcon\Mvc\Micro will use this class + * */ class Exception extends \Phalcon\Exception { diff --git a/ide/stubs/Phalcon/mvc/micro/LazyLoader.php b/ide/stubs/Phalcon/mvc/micro/LazyLoader.php index 02329b533..a37d64e29 100644 --- a/ide/stubs/Phalcon/mvc/micro/LazyLoader.php +++ b/ide/stubs/Phalcon/mvc/micro/LazyLoader.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Micro\LazyLoader + * * Lazy-Load of handlers for Mvc\Micro using auto-loading */ class LazyLoader @@ -21,16 +22,17 @@ public function getDefinition() {} /** * Phalcon\Mvc\Micro\LazyLoader constructor * - * @param string $definition + * @param string $definition */ public function __construct($definition) {} /** * Initializes the internal handler, calling functions on it * - * @param string $method - * @param array $arguments - * @return mixed + * + * @param string $method + * @param array $arguments + * @return mixed */ public function __call($method, $arguments) {} diff --git a/ide/stubs/Phalcon/mvc/micro/MiddlewareInterface.php b/ide/stubs/Phalcon/mvc/micro/MiddlewareInterface.php index abecc52f2..ee19ff867 100644 --- a/ide/stubs/Phalcon/mvc/micro/MiddlewareInterface.php +++ b/ide/stubs/Phalcon/mvc/micro/MiddlewareInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Micro\MiddlewareInterface + * * Allows to implement Phalcon\Mvc\Micro middleware in classes */ interface MiddlewareInterface @@ -12,7 +13,7 @@ interface MiddlewareInterface /** * Calls the middleware * - * @param mixed $application + * @param \Phalcon\Mvc\Micro $application */ public function call(\Phalcon\Mvc\Micro $application); diff --git a/ide/stubs/Phalcon/mvc/model/Behavior.php b/ide/stubs/Phalcon/mvc/model/Behavior.php index 5524acd04..a6b33bfe4 100644 --- a/ide/stubs/Phalcon/mvc/model/Behavior.php +++ b/ide/stubs/Phalcon/mvc/model/Behavior.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\Behavior + * * This is an optional base class for ORM behaviors */ abstract class Behavior implements \Phalcon\Mvc\Model\BehaviorInterface @@ -15,40 +16,43 @@ abstract class Behavior implements \Phalcon\Mvc\Model\BehaviorInterface /** * Phalcon\Mvc\Model\Behavior * - * @param array $options + * + * @param array $options */ public function __construct($options = null) {} /** * Checks whether the behavior must take action on certain event * - * @param string $eventName - * @return bool + * @param string $eventName + * @return bool */ protected function mustTakeAction($eventName) {} /** * Returns the behavior options related to an event * - * @param string $eventName - * @return array + * + * @param string $eventName + * @return array */ protected function getOptions($eventName = null) {} /** * This method receives the notifications from the EventsManager * - * @param string $type - * @param mixed $model + * @param string $type + * @param \Phalcon\Mvc\ModelInterface $model */ public function notify($type, \Phalcon\Mvc\ModelInterface $model) {} /** * Acts as fallbacks when a missing method is called on the model * - * @param \Phalcon\Mvc\ModelInterface $model - * @param string $method - * @param array $arguments + * + * @param \Phalcon\Mvc\ModelInterface $model + * @param string $method + * @param array $arguments */ public function missingMethod(\Phalcon\Mvc\ModelInterface $model, $method, $arguments = null) {} diff --git a/ide/stubs/Phalcon/mvc/model/BehaviorInterface.php b/ide/stubs/Phalcon/mvc/model/BehaviorInterface.php index 955d07070..d284f1bf4 100644 --- a/ide/stubs/Phalcon/mvc/model/BehaviorInterface.php +++ b/ide/stubs/Phalcon/mvc/model/BehaviorInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\BehaviorInterface + * * Interface for Phalcon\Mvc\Model\Behavior */ interface BehaviorInterface @@ -12,17 +13,18 @@ interface BehaviorInterface /** * This method receives the notifications from the EventsManager * - * @param string $type - * @param mixed $model + * @param string $type + * @param \Phalcon\Mvc\ModelInterface $model */ public function notify($type, \Phalcon\Mvc\ModelInterface $model); /** * Calls a method when it's missing in the model * - * @param \Phalcon\Mvc\ModelInterface $model - * @param string $method - * @param array $arguments + * + * @param \Phalcon\Mvc\ModelInterface $model + * @param string $method + * @param array $arguments */ public function missingMethod(\Phalcon\Mvc\ModelInterface $model, $method, $arguments = null); diff --git a/ide/stubs/Phalcon/mvc/model/Criteria.php b/ide/stubs/Phalcon/mvc/model/Criteria.php index 11bf8d4b8..eef4535ae 100644 --- a/ide/stubs/Phalcon/mvc/model/Criteria.php +++ b/ide/stubs/Phalcon/mvc/model/Criteria.php @@ -4,17 +4,19 @@ /** * Phalcon\Mvc\Model\Criteria + * * This class is used to build the array parameter required by * Phalcon\Mvc\Model::find() and Phalcon\Mvc\Model::findFirst() * using an object-oriented interface. + * * * $robots = Robots::query() - * ->where("type = :type:") - * ->andWhere("year < 2000") - * ->bind(["type" => "mechanical"]) - * ->limit(5, 10) - * ->orderBy("name") - * ->execute(); + * ->where("type = :type:") + * ->andWhere("year < 2000") + * ->bind(["type" => "mechanical"]) + * ->limit(5, 10) + * ->orderBy("name") + * ->execute(); * */ class Criteria implements \Phalcon\Mvc\Model\CriteriaInterface, \Phalcon\Di\InjectionAwareInterface @@ -38,29 +40,29 @@ class Criteria implements \Phalcon\Mvc\Model\CriteriaInterface, \Phalcon\Di\Inje /** * Sets the DependencyInjector container * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the DependencyInjector container * - * @return null|\Phalcon\DiInterface + * @return null|\Phalcon\DiInterface */ public function getDI() {} /** * Set a model on which the query will be executed * - * @param string $modelName - * @return Criteria + * @param string $modelName + * @return Criteria */ public function setModelName($modelName) {} /** * Returns an internal model name on which the criteria will be applied * - * @return string + * @return string */ public function getModelName() {} @@ -68,9 +70,9 @@ public function getModelName() {} * Sets the bound parameters in the criteria * This method replaces all previously set bound parameters * - * @param array $bindParams - * @param bool $merge - * @return Criteria + * @param array $bindParams + * @param bool $merge + * @return Criteria */ public function bind(array $bindParams, $merge = false) {} @@ -78,37 +80,40 @@ public function bind(array $bindParams, $merge = false) {} * Sets the bind types in the criteria * This method replaces all previously set bound parameters * - * @param array $bindTypes - * @return Criteria + * @param array $bindTypes + * @return Criteria */ public function bindTypes(array $bindTypes) {} /** * Sets SELECT DISTINCT / SELECT ALL flag * - * @param mixed $distinct - * @return Criteria + * @param mixed $distinct + * @return Criteria */ public function distinct($distinct) {} /** * Sets the columns to be queried + * * * $criteria->columns( - * [ - * "id", - * "name", - * ] + * [ + * "id", + * "name", + * ] * ); * * - * @param string|array $columns - * @return \Phalcon\Mvc\Model\Criteria + * + * @param string|array $columns + * @return Criteria */ public function columns($columns) {} /** * Adds an INNER join to the query + * * * $criteria->join("Robots"); * $criteria->join("Robots", "r.id = RobotsParts.robots_id"); @@ -116,211 +121,220 @@ public function columns($columns) {} * $criteria->join("Robots", "r.id = RobotsParts.robots_id", "r", "LEFT"); * * - * @param string $model - * @param mixed $conditions - * @param mixed $alias - * @param mixed $type - * @return Criteria + * @param string $model + * @param mixed $conditions + * @param mixed $alias + * @param mixed $type + * @return Criteria */ public function join($model, $conditions = null, $alias = null, $type = null) {} /** * Adds an INNER join to the query + * * * $criteria->innerJoin("Robots"); * $criteria->innerJoin("Robots", "r.id = RobotsParts.robots_id"); * $criteria->innerJoin("Robots", "r.id = RobotsParts.robots_id", "r"); * * - * @param string $model - * @param mixed $conditions - * @param mixed $alias - * @return Criteria + * @param string $model + * @param mixed $conditions + * @param mixed $alias + * @return Criteria */ public function innerJoin($model, $conditions = null, $alias = null) {} /** * Adds a LEFT join to the query + * * * $criteria->leftJoin("Robots", "r.id = RobotsParts.robots_id", "r"); * * - * @param string $model - * @param mixed $conditions - * @param mixed $alias - * @return Criteria + * @param string $model + * @param mixed $conditions + * @param mixed $alias + * @return Criteria */ public function leftJoin($model, $conditions = null, $alias = null) {} /** * Adds a RIGHT join to the query + * * * $criteria->rightJoin("Robots", "r.id = RobotsParts.robots_id", "r"); * * - * @param string $model - * @param mixed $conditions - * @param mixed $alias - * @return Criteria + * @param string $model + * @param mixed $conditions + * @param mixed $alias + * @return Criteria */ public function rightJoin($model, $conditions = null, $alias = null) {} /** * Sets the conditions parameter in the criteria * - * @param string $conditions - * @param mixed $bindParams - * @param mixed $bindTypes - * @return Criteria + * @param string $conditions + * @param mixed $bindParams + * @param mixed $bindTypes + * @return Criteria */ public function where($conditions, $bindParams = null, $bindTypes = null) {} /** * Appends a condition to the current conditions using an AND operator (deprecated) * + * * @deprecated 1.0.0 * @see \Phalcon\Mvc\Model\Criteria::andWhere() - * @param string $conditions - * @param mixed $bindParams - * @param mixed $bindTypes - * @return Criteria + * @param string $conditions + * @param mixed $bindParams + * @param mixed $bindTypes + * @return Criteria */ public function addWhere($conditions, $bindParams = null, $bindTypes = null) {} /** * Appends a condition to the current conditions using an AND operator * - * @param string $conditions - * @param mixed $bindParams - * @param mixed $bindTypes - * @return Criteria + * @param string $conditions + * @param mixed $bindParams + * @param mixed $bindTypes + * @return Criteria */ public function andWhere($conditions, $bindParams = null, $bindTypes = null) {} /** * Appends a condition to the current conditions using an OR operator * - * @param string $conditions - * @param mixed $bindParams - * @param mixed $bindTypes - * @return Criteria + * @param string $conditions + * @param mixed $bindParams + * @param mixed $bindTypes + * @return Criteria */ public function orWhere($conditions, $bindParams = null, $bindTypes = null) {} /** * Appends a BETWEEN condition to the current conditions + * * * $criteria->betweenWhere("price", 100.25, 200.50); * * - * @param string $expr - * @param mixed $minimum - * @param mixed $maximum - * @return Criteria + * @param string $expr + * @param mixed $minimum + * @param mixed $maximum + * @return Criteria */ public function betweenWhere($expr, $minimum, $maximum) {} /** * Appends a NOT BETWEEN condition to the current conditions + * * * $criteria->notBetweenWhere("price", 100.25, 200.50); * * - * @param string $expr - * @param mixed $minimum - * @param mixed $maximum - * @return Criteria + * @param string $expr + * @param mixed $minimum + * @param mixed $maximum + * @return Criteria */ public function notBetweenWhere($expr, $minimum, $maximum) {} /** * Appends an IN condition to the current conditions + * * * $criteria->inWhere("id", [1, 2, 3]); * * - * @param string $expr - * @param array $values - * @return Criteria + * @param string $expr + * @param array $values + * @return Criteria */ public function inWhere($expr, array $values) {} /** * Appends a NOT IN condition to the current conditions + * * * $criteria->notInWhere("id", [1, 2, 3]); * * - * @param string $expr - * @param array $values - * @return Criteria + * @param string $expr + * @param array $values + * @return Criteria */ public function notInWhere($expr, array $values) {} /** * Adds the conditions parameter to the criteria * - * @param string $conditions - * @return Criteria + * @param string $conditions + * @return Criteria */ public function conditions($conditions) {} /** * Adds the order-by parameter to the criteria (deprecated) * + * * @deprecated 1.2.1 * @see \Phalcon\Mvc\Model\Criteria::orderBy() - * @param string $orderColumns - * @return Criteria + * @param string $orderColumns + * @return Criteria */ public function order($orderColumns) {} /** * Adds the order-by clause to the criteria * - * @param string $orderColumns - * @return Criteria + * @param string $orderColumns + * @return Criteria */ public function orderBy($orderColumns) {} /** * Adds the group-by clause to the criteria * - * @param mixed $group - * @return Criteria + * @param mixed $group + * @return Criteria */ public function groupBy($group) {} /** * Adds the having clause to the criteria * - * @param mixed $having - * @return Criteria + * @param mixed $having + * @return Criteria */ public function having($having) {} /** * Adds the limit parameter to the criteria * - * @param mixed $limit - * @param mixed $offset - * @return Criteria + * @param mixed $limit + * @param mixed $offset + * @return Criteria */ public function limit($limit, $offset = null) {} /** * Adds the "for_update" parameter to the criteria * - * @param bool $forUpdate - * @return Criteria + * @param bool $forUpdate + * @return Criteria */ public function forUpdate($forUpdate = true) {} /** * Adds the "shared_lock" parameter to the criteria * - * @param bool $sharedLock - * @return Criteria + * @param bool $sharedLock + * @return Criteria */ public function sharedLock($sharedLock = true) {} @@ -328,29 +342,30 @@ public function sharedLock($sharedLock = true) {} * Sets the cache options in the criteria * This method replaces all previously set cache options * - * @param array $cache - * @return Criteria + * @param array $cache + * @return Criteria */ public function cache(array $cache) {} /** * Returns the conditions parameter in the criteria * - * @return string|null + * @return string|null */ public function getWhere() {} /** * Returns the columns to be queried * - * @return string|array|null + * + * @return string|null */ public function getColumns() {} /** * Returns the conditions parameter in the criteria * - * @return string|null + * @return string|null */ public function getConditions() {} @@ -360,14 +375,15 @@ public function getConditions() {} * an array with 'number' and 'offset' keys if an offset was set with the limit, * or null if limit has not been set. * - * @return int|array|null + * + * @return string|null */ public function getLimit() {} /** * Returns the order clause in the criteria * - * @return string|null + * @return string|null */ public function getOrderBy() {} @@ -384,25 +400,26 @@ public function getHaving() {} /** * Returns all the parameters defined in the criteria * - * @return array + * + * @return array */ public function getParams() {} /** * Builds a Phalcon\Mvc\Model\Criteria based on an input array like _POST * - * @param mixed $dependencyInjector - * @param string $modelName - * @param array $data - * @param string $operator - * @return Criteria + * @param \Phalcon\DiInterface $dependencyInjector + * @param string $modelName + * @param array $data + * @param string $operator + * @return Criteria */ public static function fromInput(\Phalcon\DiInterface $dependencyInjector, $modelName, array $data, $operator = "AND") {} /** * Executes a find using the parameters built with the criteria * - * @return \Phalcon\Mvc\Model\ResultsetInterface + * @return \Phalcon\Mvc\Model\ResultsetInterface */ public function execute() {} diff --git a/ide/stubs/Phalcon/mvc/model/CriteriaInterface.php b/ide/stubs/Phalcon/mvc/model/CriteriaInterface.php index dde298be1..8b208f51e 100644 --- a/ide/stubs/Phalcon/mvc/model/CriteriaInterface.php +++ b/ide/stubs/Phalcon/mvc/model/CriteriaInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\CriteriaInterface + * * Interface for Phalcon\Mvc\Model\Criteria */ interface CriteriaInterface @@ -12,15 +13,15 @@ interface CriteriaInterface /** * Set a model on which the query will be executed * - * @param string $modelName - * @return CriteriaInterface + * @param string $modelName + * @return CriteriaInterface */ public function setModelName($modelName); /** * Returns an internal model name on which the criteria will be applied * - * @return string + * @return string */ public function getModelName(); @@ -28,8 +29,8 @@ public function getModelName(); * Sets the bound parameters in the criteria * This method replaces all previously set bound parameters * - * @param array $bindParams - * @return CriteriaInterface + * @param array $bindParams + * @return CriteriaInterface */ public function bind(array $bindParams); @@ -37,141 +38,152 @@ public function bind(array $bindParams); * Sets the bind types in the criteria * This method replaces all previously set bound parameters * - * @param array $bindTypes - * @return CriteriaInterface + * @param array $bindTypes + * @return CriteriaInterface */ public function bindTypes(array $bindTypes); /** * Sets the conditions parameter in the criteria * - * @param string $conditions - * @return CriteriaInterface + * @param string $conditions + * @return CriteriaInterface */ public function where($conditions); /** * Adds the conditions parameter to the criteria * - * @param string $conditions - * @return CriteriaInterface + * @param string $conditions + * @return CriteriaInterface */ public function conditions($conditions); /** * Adds the order-by parameter to the criteria * - * @param string $orderColumns - * @return CriteriaInterface + * @param string $orderColumns + * @return CriteriaInterface */ public function orderBy($orderColumns); /** * Sets the limit parameter to the criteria * - * @param int $limit - * @param int $offset - * @return \Phalcon\Mvc\Model\CriteriaInterface + * + * @param int $limit + * @param int $offset + * @return CriteriaInterface */ public function limit($limit, $offset = null); /** * Sets the "for_update" parameter to the criteria * - * @param bool $forUpdate - * @return CriteriaInterface + * @param bool $forUpdate + * @return CriteriaInterface */ public function forUpdate($forUpdate = true); /** * Sets the "shared_lock" parameter to the criteria * - * @param bool $sharedLock - * @return CriteriaInterface + * @param bool $sharedLock + * @return CriteriaInterface */ public function sharedLock($sharedLock = true); /** * Appends a condition to the current conditions using an AND operator * - * @param string $conditions - * @param array $bindParams - * @param array $bindTypes - * @return \Phalcon\Mvc\Model\CriteriaInterface + * + * @param string $conditions + * @param array $bindParams + * @param array $bindTypes + * @return CriteriaInterface */ public function andWhere($conditions, $bindParams = null, $bindTypes = null); /** * Appends a condition to the current conditions using an OR operator * - * @param string $conditions - * @param array $bindParams - * @param array $bindTypes - * @return \Phalcon\Mvc\Model\CriteriaInterface + * + * @param string $conditions + * @param array $bindParams + * @param array $bindTypes + * @return CriteriaInterface */ public function orWhere($conditions, $bindParams = null, $bindTypes = null); /** * Appends a BETWEEN condition to the current conditions + * * * $criteria->betweenWhere("price", 100.25, 200.50); * * - * @param string $expr - * @param mixed $minimum - * @param mixed $maximum - * @return \Phalcon\Mvc\Model\CriteriaInterface + * + * @param string $expr + * @param mixed $minimum + * @param mixed $maximum + * @return CriteriaInterface */ public function betweenWhere($expr, $minimum, $maximum); /** * Appends a NOT BETWEEN condition to the current conditions + * * * $criteria->notBetweenWhere("price", 100.25, 200.50); * * - * @param string $expr - * @param mixed $minimum - * @param mixed $maximum - * @return \Phalcon\Mvc\Model\CriteriaInterface + * + * @param string $expr + * @param mixed $minimum + * @param mixed $maximum + * @return CriteriaInterface */ public function notBetweenWhere($expr, $minimum, $maximum); /** * Appends an IN condition to the current conditions + * * * $criteria->inWhere("id", [1, 2, 3]); * * - * @param string $expr - * @param array $values - * @return CriteriaInterface + * @param string $expr + * @param array $values + * @return CriteriaInterface */ public function inWhere($expr, array $values); /** * Appends a NOT IN condition to the current conditions + * * * $criteria->notInWhere("id", [1, 2, 3]); * * - * @param string $expr - * @param array $values - * @return CriteriaInterface + * @param string $expr + * @param array $values + * @return CriteriaInterface */ public function notInWhere($expr, array $values); /** * Returns the conditions parameter in the criteria * - * @return string|null + * + * @return string|null */ public function getWhere(); /** * Returns the conditions parameter in the criteria * - * @return string|null + * + * @return string|null */ public function getConditions(); @@ -181,28 +193,31 @@ public function getConditions(); * an array with 'number' and 'offset' keys if an offset was set with the limit, * or null if limit has not been set. * - * @return int|array|null + * + * @return int|array|null */ public function getLimit(); /** * Returns the order parameter in the criteria * - * @return string|null + * + * @return string|null */ public function getOrderBy(); /** * Returns all the parameters defined in the criteria * - * @return array + * + * @return array */ public function getParams(); /** * Executes a find using the parameters built with the criteria * - * @return ResultsetInterface + * @return ResultsetInterface */ public function execute(); diff --git a/ide/stubs/Phalcon/mvc/model/Exception.php b/ide/stubs/Phalcon/mvc/model/Exception.php index 1685da6d4..61bfb83a7 100644 --- a/ide/stubs/Phalcon/mvc/model/Exception.php +++ b/ide/stubs/Phalcon/mvc/model/Exception.php @@ -4,7 +4,8 @@ /** * Phalcon\Mvc\Model\Exception - * Exceptions thrown in Phalcon\Mvc\Model\* classes will use this class + * + * Exceptions thrown in Phalcon\Mvc\Model\ classes will use this class */ class Exception extends \Phalcon\Exception { diff --git a/ide/stubs/Phalcon/mvc/model/Manager.php b/ide/stubs/Phalcon/mvc/model/Manager.php index fe4704df0..5069d81ed 100644 --- a/ide/stubs/Phalcon/mvc/model/Manager.php +++ b/ide/stubs/Phalcon/mvc/model/Manager.php @@ -4,19 +4,25 @@ /** * Phalcon\Mvc\Model\Manager + * * This components controls the initialization of models, keeping record of relations * between the different models of the application. + * * A ModelsManager is injected to a model via a Dependency Injector/Services Container such as Phalcon\Di. + * * * use Phalcon\Di; * use Phalcon\Mvc\Model\Manager as ModelsManager; + * * $di = new Di(); + * * $di->set( - * "modelsManager", - * function() { - * return new ModelsManager(); - * } + * "modelsManager", + * function() { + * return new ModelsManager(); + * } * ); + * * $robot = new Robots($di); * */ @@ -129,189 +135,190 @@ class Manager implements \Phalcon\Mvc\Model\ManagerInterface, \Phalcon\Di\Inject /** * Sets the DependencyInjector container * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the DependencyInjector container * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI() {} /** * Sets a global events manager * - * @param mixed $eventsManager - * @return Manager + * @param \Phalcon\Events\ManagerInterface $eventsManager + * @return Manager */ public function setEventsManager(\Phalcon\Events\ManagerInterface $eventsManager) {} /** * Returns the internal event manager * - * @return \Phalcon\Events\ManagerInterface + * @return \Phalcon\Events\ManagerInterface */ public function getEventsManager() {} /** * Sets a custom events manager for a specific model * - * @param mixed $model - * @param mixed $eventsManager + * @param \Phalcon\Mvc\ModelInterface $model + * @param \Phalcon\Events\ManagerInterface $eventsManager */ public function setCustomEventsManager(\Phalcon\Mvc\ModelInterface $model, \Phalcon\Events\ManagerInterface $eventsManager) {} /** * Returns a custom events manager related to a model * - * @param mixed $model - * @return bool|\Phalcon\Events\ManagerInterface + * @param \Phalcon\Mvc\ModelInterface $model + * @return bool|\Phalcon\Events\ManagerInterface */ public function getCustomEventsManager(\Phalcon\Mvc\ModelInterface $model) {} /** * Initializes a model in the model manager * - * @param mixed $model - * @return bool + * @param \Phalcon\Mvc\ModelInterface $model + * @return bool */ public function initialize(\Phalcon\Mvc\ModelInterface $model) {} /** * Check whether a model is already initialized * - * @param string $modelName - * @return bool + * @param string $modelName + * @return bool */ public function isInitialized($modelName) {} /** * Get last initialized model * - * @return \Phalcon\Mvc\ModelInterface + * @return \Phalcon\Mvc\ModelInterface */ public function getLastInitialized() {} /** * Loads a model throwing an exception if it doesn't exist * - * @param string $modelName - * @param bool $newInstance - * @return \Phalcon\Mvc\ModelInterface + * @param string $modelName + * @param bool $newInstance + * @return \Phalcon\Mvc\ModelInterface */ public function load($modelName, $newInstance = false) {} /** * Sets the mapped source for a model * - * @param mixed $model - * @param string $source + * @param \Phalcon\Mvc\ModelInterface $model + * @param string $source */ public function setModelSource(\Phalcon\Mvc\ModelInterface $model, $source) {} /** * Check whether a model property is declared as public. + * * * $isPublic = $manager->isVisibleModelProperty( - * new Robots(), - * "name" + * new Robots(), + * "name" * ); * * - * @param mixed $model - * @param string $property - * @return bool + * @param \Phalcon\Mvc\ModelInterface $model + * @param string $property + * @return bool */ public final function isVisibleModelProperty(\Phalcon\Mvc\ModelInterface $model, $property) {} /** * Returns the mapped source for a model * - * @param mixed $model - * @return string + * @param \Phalcon\Mvc\ModelInterface $model + * @return string */ public function getModelSource(\Phalcon\Mvc\ModelInterface $model) {} /** * Sets the mapped schema for a model * - * @param mixed $model - * @param string $schema + * @param \Phalcon\Mvc\ModelInterface $model + * @param string $schema */ public function setModelSchema(\Phalcon\Mvc\ModelInterface $model, $schema) {} /** * Returns the mapped schema for a model * - * @param mixed $model - * @return string + * @param \Phalcon\Mvc\ModelInterface $model + * @return string */ public function getModelSchema(\Phalcon\Mvc\ModelInterface $model) {} /** * Sets both write and read connection service for a model * - * @param mixed $model - * @param string $connectionService + * @param \Phalcon\Mvc\ModelInterface $model + * @param string $connectionService */ public function setConnectionService(\Phalcon\Mvc\ModelInterface $model, $connectionService) {} /** * Sets write connection service for a model * - * @param mixed $model - * @param string $connectionService + * @param \Phalcon\Mvc\ModelInterface $model + * @param string $connectionService */ public function setWriteConnectionService(\Phalcon\Mvc\ModelInterface $model, $connectionService) {} /** * Sets read connection service for a model * - * @param mixed $model - * @param string $connectionService + * @param \Phalcon\Mvc\ModelInterface $model + * @param string $connectionService */ public function setReadConnectionService(\Phalcon\Mvc\ModelInterface $model, $connectionService) {} /** * Returns the connection to read data related to a model * - * @param mixed $model - * @return \Phalcon\Db\AdapterInterface + * @param \Phalcon\Mvc\ModelInterface $model + * @return \Phalcon\Db\AdapterInterface */ public function getReadConnection(\Phalcon\Mvc\ModelInterface $model) {} /** * Returns the connection to write data related to a model * - * @param mixed $model - * @return \Phalcon\Db\AdapterInterface + * @param \Phalcon\Mvc\ModelInterface $model + * @return \Phalcon\Db\AdapterInterface */ public function getWriteConnection(\Phalcon\Mvc\ModelInterface $model) {} /** * Returns the connection to read or write data related to a model depending on the connection services. * - * @param mixed $model - * @param mixed $connectionServices - * @return \Phalcon\Db\AdapterInterface + * @param \Phalcon\Mvc\ModelInterface $model + * @param mixed $connectionServices + * @return \Phalcon\Db\AdapterInterface */ protected function _getConnection(\Phalcon\Mvc\ModelInterface $model, $connectionServices) {} /** * Returns the connection service name used to read data related to a model * - * @param mixed $model - * @return string + * @param \Phalcon\Mvc\ModelInterface $model + * @return string */ public function getReadConnectionService(\Phalcon\Mvc\ModelInterface $model) {} /** * Returns the connection service name used to write data related to a model * - * @param mixed $model - * @return string + * @param \Phalcon\Mvc\ModelInterface $model + * @return string */ public function getWriteConnectionService(\Phalcon\Mvc\ModelInterface $model) {} @@ -319,9 +326,9 @@ public function getWriteConnectionService(\Phalcon\Mvc\ModelInterface $model) {} * Returns the connection service name used to read or write data related to * a model depending on the connection services * - * @param mixed $model - * @param mixed $connectionServices - * @return string + * @param \Phalcon\Mvc\ModelInterface $model + * @param mixed $connectionServices + * @return string */ public function _getConnectionService(\Phalcon\Mvc\ModelInterface $model, $connectionServices) {} @@ -329,8 +336,8 @@ public function _getConnectionService(\Phalcon\Mvc\ModelInterface $model, $conne * Receives events generated in the models and dispatches them to an events-manager if available * Notify the behaviors that are listening in the model * - * @param string $eventName - * @param mixed $model + * @param string $eventName + * @param \Phalcon\Mvc\ModelInterface $model */ public function notifyEvent($eventName, \Phalcon\Mvc\ModelInterface $model) {} @@ -339,202 +346,207 @@ public function notifyEvent($eventName, \Phalcon\Mvc\ModelInterface $model) {} * This method expects that the endpoint listeners/behaviors returns true * meaning that a least one was implemented * - * @param mixed $model - * @param string $eventName - * @param mixed $data + * @param \Phalcon\Mvc\ModelInterface $model + * @param string $eventName + * @param mixed $data */ public function missingMethod(\Phalcon\Mvc\ModelInterface $model, $eventName, $data) {} /** * Binds a behavior to a model * - * @param mixed $model - * @param mixed $behavior + * @param \Phalcon\Mvc\ModelInterface $model + * @param \Phalcon\Mvc\Model\BehaviorInterface $behavior */ public function addBehavior(\Phalcon\Mvc\ModelInterface $model, \Phalcon\Mvc\Model\BehaviorInterface $behavior) {} /** * Sets if a model must keep snapshots * - * @param mixed $model - * @param bool $keepSnapshots + * @param \Phalcon\Mvc\ModelInterface $model + * @param bool $keepSnapshots */ public function keepSnapshots(\Phalcon\Mvc\ModelInterface $model, $keepSnapshots) {} /** * Checks if a model is keeping snapshots for the queried records * - * @param mixed $model - * @return bool + * @param \Phalcon\Mvc\ModelInterface $model + * @return bool */ public function isKeepingSnapshots(\Phalcon\Mvc\ModelInterface $model) {} /** * Sets if a model must use dynamic update instead of the all-field update * - * @param mixed $model - * @param bool $dynamicUpdate + * @param \Phalcon\Mvc\ModelInterface $model + * @param bool $dynamicUpdate */ public function useDynamicUpdate(\Phalcon\Mvc\ModelInterface $model, $dynamicUpdate) {} /** * Checks if a model is using dynamic update instead of all-field update * - * @param mixed $model - * @return bool + * @param \Phalcon\Mvc\ModelInterface $model + * @return bool */ public function isUsingDynamicUpdate(\Phalcon\Mvc\ModelInterface $model) {} /** * Setup a 1-1 relation between two models * + * * @param mixed fields * @param string referencedModel * @param mixed referencedFields * @param array options - * @param \Phalcon\Mvc\Model $model - * @param mixed $fields - * @param string $referencedModel - * @param mixed $referencedFields - * @param mixed $options - * @return \Phalcon\Mvc\Model\Relation + * @param \Phalcon\Mvc\Model $model + * @param mixed $fields + * @param string $referencedModel + * @param mixed $referencedFields + * @param mixed $options + * @return \Phalcon\Mvc\Model\Relation */ public function addHasOne(\Phalcon\Mvc\ModelInterface $model, $fields, $referencedModel, $referencedFields, $options = null) {} /** * Setup a relation reverse many to one between two models * + * * @param mixed fields * @param string referencedModel * @param mixed referencedFields * @param array options - * @param \Phalcon\Mvc\Model $model - * @param mixed $fields - * @param string $referencedModel - * @param mixed $referencedFields - * @param mixed $options - * @return \Phalcon\Mvc\Model\Relation + * @param \Phalcon\Mvc\Model $model + * @param mixed $fields + * @param string $referencedModel + * @param mixed $referencedFields + * @param mixed $options + * @return \Phalcon\Mvc\Model\Relation */ public function addBelongsTo(\Phalcon\Mvc\ModelInterface $model, $fields, $referencedModel, $referencedFields, $options = null) {} /** * Setup a relation 1-n between two models * + * * @param mixed fields * @param string referencedModel * @param mixed referencedFields * @param array options - * @param mixed $model - * @param mixed $fields - * @param string $referencedModel - * @param mixed $referencedFields - * @param mixed $options - * @param $Phalcon\Mvc\ModelInterface model - * @return \Phalcon\Mvc\Model\Relation + * @param \Phalcon\Mvc\ModelInterface $model + * @param mixed $fields + * @param string $referencedModel + * @param mixed $referencedFields + * @param mixed $options + * @param $Phalcon\Mvc\ModelInterface model + * @return \Phalcon\Mvc\Model\Relation */ public function addHasMany(\Phalcon\Mvc\ModelInterface $model, $fields, $referencedModel, $referencedFields, $options = null) {} /** * Setups a relation n-m between two models * + * * @param string fields * @param string intermediateModel * @param string intermediateFields * @param string intermediateReferencedFields * @param string referencedModel * @param string referencedFields - * @param mixed $model - * @param mixed $fields - * @param string $intermediateModel - * @param mixed $intermediateFields - * @param mixed $intermediateReferencedFields - * @param string $referencedModel - * @param mixed $referencedFields - * @param array $options - * @param $Phalcon\Mvc\ModelInterface model - * @return \Phalcon\Mvc\Model\Relation + * @param \Phalcon\Mvc\ModelInterface $model + * @param mixed $fields + * @param string $intermediateModel + * @param mixed $intermediateFields + * @param mixed $intermediateReferencedFields + * @param string $referencedModel + * @param mixed $referencedFields + * @param array $options + * @param $Phalcon\Mvc\ModelInterface model + * @return \Phalcon\Mvc\Model\Relation */ public function addHasManyToMany(\Phalcon\Mvc\ModelInterface $model, $fields, $intermediateModel, $intermediateFields, $intermediateReferencedFields, $referencedModel, $referencedFields, $options = null) {} /** * Checks whether a model has a belongsTo relation with another model * - * @param string $modelName - * @param string $modelRelation - * @return bool + * @param string $modelName + * @param string $modelRelation + * @return bool */ public function existsBelongsTo($modelName, $modelRelation) {} /** * Checks whether a model has a hasMany relation with another model * - * @param string $modelName - * @param string $modelRelation - * @return bool + * @param string $modelName + * @param string $modelRelation + * @return bool */ public function existsHasMany($modelName, $modelRelation) {} /** * Checks whether a model has a hasOne relation with another model * - * @param string $modelName - * @param string $modelRelation - * @return bool + * @param string $modelName + * @param string $modelRelation + * @return bool */ public function existsHasOne($modelName, $modelRelation) {} /** * Checks whether a model has a hasManyToMany relation with another model * - * @param string $modelName - * @param string $modelRelation - * @return bool + * @param string $modelName + * @param string $modelRelation + * @return bool */ public function existsHasManyToMany($modelName, $modelRelation) {} /** * Returns a relation by its alias * - * @param string $modelName - * @param string $alias - * @return bool|\Phalcon\Mvc\Model\Relation + * @param string $modelName + * @param string $alias + * @return bool|\Phalcon\Mvc\Model\Relation */ public function getRelationByAlias($modelName, $alias) {} /** * Merge two arrays of find parameters * - * @param mixed $findParamsOne - * @param mixed $findParamsTwo - * @return array + * @param mixed $findParamsOne + * @param mixed $findParamsTwo + * @return array */ protected final function _mergeFindParameters($findParamsOne, $findParamsTwo) {} /** * Helper method to query records based on a relation definition * - * @param mixed $relation - * @param string $method - * @param mixed $record - * @param mixed $parameters - * @return \Phalcon\Mvc\Model\Resultset\Simple|Phalcon\Mvc\Model\Resultset\Simple|int|false + * + * @param \Phalcon\Mvc\Model\RelationInterface $relation + * @param string $method + * @param \Phalcon\Mvc\ModelInterface $record + * @param mixed $parameters + * @return \Phalcon\Mvc\Model\Resultset\Simple|Phalcon\Mvc\Model\Resultset\Simple|int|false */ public function getRelationRecords(\Phalcon\Mvc\Model\RelationInterface $relation, $method, \Phalcon\Mvc\ModelInterface $record, $parameters = null) {} /** * Returns a reusable object from the internal list * - * @param string $modelName - * @param string $key + * @param string $modelName + * @param string $key */ public function getReusableRecords($modelName, $key) {} /** * Stores a reusable record in the internal list * - * @param string $modelName - * @param string $key - * @param mixed $records + * @param string $modelName + * @param string $key + * @param mixed $records */ public function setReusableRecords($modelName, $key, $records) {} @@ -546,154 +558,155 @@ public function clearReusableObjects() {} /** * Gets belongsTo related records from a model * - * @param string $method - * @param string $modelName - * @param mixed $modelRelation - * @param mixed $record - * @param mixed $parameters - * @return bool|\Phalcon\Mvc\Model\ResultsetInterface + * @param string $method + * @param string $modelName + * @param mixed $modelRelation + * @param \Phalcon\Mvc\ModelInterface $record + * @param mixed $parameters + * @return bool|\Phalcon\Mvc\Model\ResultsetInterface */ public function getBelongsToRecords($method, $modelName, $modelRelation, \Phalcon\Mvc\ModelInterface $record, $parameters = null) {} /** * Gets hasMany related records from a model * - * @param string $method - * @param string $modelName - * @param mixed $modelRelation - * @param mixed $record - * @param mixed $parameters - * @return bool|\Phalcon\Mvc\Model\ResultsetInterface + * @param string $method + * @param string $modelName + * @param mixed $modelRelation + * @param \Phalcon\Mvc\ModelInterface $record + * @param mixed $parameters + * @return bool|\Phalcon\Mvc\Model\ResultsetInterface */ public function getHasManyRecords($method, $modelName, $modelRelation, \Phalcon\Mvc\ModelInterface $record, $parameters = null) {} /** * Gets belongsTo related records from a model * - * @param string $method - * @param string $modelName - * @param mixed $modelRelation - * @param mixed $record - * @param mixed $parameters - * @return bool|\Phalcon\Mvc\ModelInterface + * @param string $method + * @param string $modelName + * @param mixed $modelRelation + * @param \Phalcon\Mvc\ModelInterface $record + * @param mixed $parameters + * @return bool|\Phalcon\Mvc\ModelInterface */ public function getHasOneRecords($method, $modelName, $modelRelation, \Phalcon\Mvc\ModelInterface $record, $parameters = null) {} /** * Gets all the belongsTo relations defined in a model + * * * $relations = $modelsManager->getBelongsTo( - * new Robots() + * new Robots() * ); * * - * @param mixed $model - * @return array|RelationInterface[] + * @param \Phalcon\Mvc\ModelInterface $model + * @return array|\Phalcon\Mvc\Model\RelationInterface[] */ public function getBelongsTo(\Phalcon\Mvc\ModelInterface $model) {} /** * Gets hasMany relations defined on a model * - * @param mixed $model - * @return array|RelationInterface[] + * @param \Phalcon\Mvc\ModelInterface $model + * @return array|\Phalcon\Mvc\Model\RelationInterface[] */ public function getHasMany(\Phalcon\Mvc\ModelInterface $model) {} /** * Gets hasOne relations defined on a model * - * @param mixed $model - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getHasOne(\Phalcon\Mvc\ModelInterface $model) {} /** * Gets hasManyToMany relations defined on a model * - * @param mixed $model - * @return array|RelationInterface[] + * @param \Phalcon\Mvc\ModelInterface $model + * @return array|\Phalcon\Mvc\Model\RelationInterface[] */ public function getHasManyToMany(\Phalcon\Mvc\ModelInterface $model) {} /** * Gets hasOne relations defined on a model * - * @param mixed $model - * @return RelationInterface[] + * @param \Phalcon\Mvc\ModelInterface $model + * @return \Phalcon\Mvc\Model\RelationInterface[] */ public function getHasOneAndHasMany(\Phalcon\Mvc\ModelInterface $model) {} /** * Query all the relationships defined on a model * - * @param string $modelName - * @return RelationInterface[] + * @param string $modelName + * @return \Phalcon\Mvc\Model\RelationInterface[] */ public function getRelations($modelName) {} /** * Query the first relationship defined between two models * - * @param string $first - * @param string $second - * @return bool|RelationInterface[] + * @param string $first + * @param string $second + * @return bool|\Phalcon\Mvc\Model\RelationInterface[] */ public function getRelationsBetween($first, $second) {} /** * Creates a Phalcon\Mvc\Model\Query without execute it * - * @param string $phql - * @return \Phalcon\Mvc\Model\QueryInterface + * @param string $phql + * @return \Phalcon\Mvc\Model\QueryInterface */ public function createQuery($phql) {} /** * Creates a Phalcon\Mvc\Model\Query and execute it * - * @param string $phql - * @param mixed $placeholders - * @param mixed $types - * @return \Phalcon\Mvc\Model\QueryInterface + * @param string $phql + * @param mixed $placeholders + * @param mixed $types + * @return \Phalcon\Mvc\Model\QueryInterface */ public function executeQuery($phql, $placeholders = null, $types = null) {} /** * Creates a Phalcon\Mvc\Model\Query\Builder * - * @param mixed $params - * @return \Phalcon\Mvc\Model\Query\BuilderInterface + * @param mixed $params + * @return \Phalcon\Mvc\Model\Query\BuilderInterface */ public function createBuilder($params = null) {} /** * Returns the last query created or executed in the models manager * - * @return \Phalcon\Mvc\Model\QueryInterface + * @return \Phalcon\Mvc\Model\QueryInterface */ public function getLastQuery() {} /** * Registers shorter aliases for namespaces in PHQL statements * - * @param string $alias - * @param string $namespaceName + * @param string $alias + * @param string $namespaceName */ public function registerNamespaceAlias($alias, $namespaceName) {} /** * Returns a real namespace from its alias * - * @param string $alias - * @return string + * @param string $alias + * @return string */ public function getNamespaceAlias($alias) {} /** * Returns all the registered namespace aliases * - * @return array + * @return array */ public function getNamespaceAliases() {} diff --git a/ide/stubs/Phalcon/mvc/model/ManagerInterface.php b/ide/stubs/Phalcon/mvc/model/ManagerInterface.php index 419c5e942..24606b5f7 100644 --- a/ide/stubs/Phalcon/mvc/model/ManagerInterface.php +++ b/ide/stubs/Phalcon/mvc/model/ManagerInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\ManagerInterface + * * Interface for Phalcon\Mvc\Model\Manager */ interface ManagerInterface @@ -12,344 +13,362 @@ interface ManagerInterface /** * Initializes a model in the model manager * - * @param mixed $model + * @param \Phalcon\Mvc\ModelInterface $model */ public function initialize(\Phalcon\Mvc\ModelInterface $model); /** * Sets the mapped source for a model * - * @param mixed $model - * @param string $source + * @param \Phalcon\Mvc\ModelInterface $model + * @param string $source */ public function setModelSource(\Phalcon\Mvc\ModelInterface $model, $source); /** * Returns the mapped source for a model * - * @param mixed $model - * @return string + * @param \Phalcon\Mvc\ModelInterface $model + * @return string */ public function getModelSource(\Phalcon\Mvc\ModelInterface $model); /** * Sets the mapped schema for a model * - * @param mixed $model - * @param string $schema + * @param \Phalcon\Mvc\ModelInterface $model + * @param string $schema */ public function setModelSchema(\Phalcon\Mvc\ModelInterface $model, $schema); /** * Returns the mapped schema for a model * - * @param mixed $model - * @return string + * @param \Phalcon\Mvc\ModelInterface $model + * @return string */ public function getModelSchema(\Phalcon\Mvc\ModelInterface $model); /** * Sets both write and read connection service for a model * - * @param mixed $model - * @param string $connectionService + * @param \Phalcon\Mvc\ModelInterface $model + * @param string $connectionService */ public function setConnectionService(\Phalcon\Mvc\ModelInterface $model, $connectionService); /** * Sets read connection service for a model * - * @param mixed $model - * @param string $connectionService + * @param \Phalcon\Mvc\ModelInterface $model + * @param string $connectionService */ public function setReadConnectionService(\Phalcon\Mvc\ModelInterface $model, $connectionService); /** * Returns the connection service name used to read data related to a model * - * @param mixed $model - * @return string + * @param \Phalcon\Mvc\ModelInterface $model + * @return string */ public function getReadConnectionService(\Phalcon\Mvc\ModelInterface $model); /** * Sets write connection service for a model * - * @param mixed $model - * @param string $connectionService + * @param \Phalcon\Mvc\ModelInterface $model + * @param string $connectionService */ public function setWriteConnectionService(\Phalcon\Mvc\ModelInterface $model, $connectionService); /** * Returns the connection service name used to write data related to a model * - * @param mixed $model - * @return string + * @param \Phalcon\Mvc\ModelInterface $model + * @return string */ public function getWriteConnectionService(\Phalcon\Mvc\ModelInterface $model); /** * Returns the connection to read data related to a model * - * @param mixed $model - * @return \Phalcon\Db\AdapterInterface + * @param \Phalcon\Mvc\ModelInterface $model + * @return \Phalcon\Db\AdapterInterface */ public function getReadConnection(\Phalcon\Mvc\ModelInterface $model); /** * Returns the connection to write data related to a model * - * @param mixed $model - * @return \Phalcon\Db\AdapterInterface + * @param \Phalcon\Mvc\ModelInterface $model + * @return \Phalcon\Db\AdapterInterface */ public function getWriteConnection(\Phalcon\Mvc\ModelInterface $model); /** * Check of a model is already initialized * - * @param string $modelName - * @return bool + * @param string $modelName + * @return bool */ public function isInitialized($modelName); /** * Get last initialized model * - * @return \Phalcon\Mvc\ModelInterface + * @return \Phalcon\Mvc\ModelInterface */ public function getLastInitialized(); /** * Loads a model throwing an exception if it doesn't exist * - * @param string $modelName - * @param bool $newInstance - * @return \Phalcon\Mvc\ModelInterface + * @param string $modelName + * @param bool $newInstance + * @return \Phalcon\Mvc\ModelInterface */ public function load($modelName, $newInstance = false); /** * Setup a 1-1 relation between two models * + * * @param mixed $fields * @param string $referencedModel * @param mixed $referencedFields * @param array $options - * @param mixed $model - * @param mixed $fields - * @param mixed $referencedModel - * @param mixed $referencedFields - * @param mixed $options - * @param \Phalcon\Mvc\ModelInterface $$model - * @return \Phalcon\Mvc\Model\RelationInterface + * @param \Phalcon\Mvc\ModelInterface $model + * @param mixed $fields + * @param mixed $referencedModel + * @param mixed $referencedFields + * @param mixed $options + * @param \Phalcon\Mvc\ModelInterface $$model + * @return \Phalcon\Mvc\Model\RelationInterface */ public function addHasOne(\Phalcon\Mvc\ModelInterface $model, $fields, $referencedModel, $referencedFields, $options = null); /** * Setup a relation reverse 1-1 between two models * + * * @param mixed $fields * @param string $referencedModel * @param mixed $referencedFields * @param array $options - * @param mixed $model - * @param mixed $fields - * @param mixed $referencedModel - * @param mixed $referencedFields - * @param mixed $options - * @param $\Phalcon\Mvc\ModelInterface $model - * @return + * @param \Phalcon\Mvc\ModelInterface $model + * @param mixed $fields + * @param mixed $referencedModel + * @param mixed $referencedFields + * @param mixed $options + * @param $\Phalcon\Mvc\ModelInterface $model + * @return */ public function addBelongsTo(\Phalcon\Mvc\ModelInterface $model, $fields, $referencedModel, $referencedFields, $options = null); /** * Setup a relation 1-n between two models * + * * @param mixed $fields * @param string $referencedModel * @param mixed $referencedFields * @param array $options - * @param mixed $model - * @param mixed $fields - * @param mixed $referencedModel - * @param mixed $referencedFields - * @param mixed $options - * @param $\Phalcon\Mvc\ModelInterface $model - * @return + * @param \Phalcon\Mvc\ModelInterface $model + * @param mixed $fields + * @param mixed $referencedModel + * @param mixed $referencedFields + * @param mixed $options + * @param $\Phalcon\Mvc\ModelInterface $model + * @return */ public function addHasMany(\Phalcon\Mvc\ModelInterface $model, $fields, $referencedModel, $referencedFields, $options = null); /** * Checks whether a model has a belongsTo relation with another model * - * @param mixed $modelName - * @param mixed $modelRelation - * @param $string $modelRelation - * @return + * + * @param mixed $modelName + * @param mixed $modelRelation + * @param $string $modelRelation + * @return */ public function existsBelongsTo($modelName, $modelRelation); /** * Checks whether a model has a hasMany relation with another model * - * @param mixed $modelName - * @param mixed $modelRelation - * @param $string $modelRelation - * @return + * + * @param mixed $modelName + * @param mixed $modelRelation + * @param $string $modelRelation + * @return */ public function existsHasMany($modelName, $modelRelation); /** * Checks whether a model has a hasOne relation with another model * - * @param mixed $modelName - * @param mixed $modelRelation - * @param $string $modelRelation - * @return + * + * @param mixed $modelName + * @param mixed $modelRelation + * @param $string $modelRelation + * @return */ public function existsHasOne($modelName, $modelRelation); /** * Gets belongsTo related records from a model * - * @param mixed $method - * @param mixed $modelName - * @param mixed $modelRelation - * @param mixed $record - * @param mixed $parameters - * @param string $$method - * @param string $$modelName - * @param string $$modelRelation - * @param \Phalcon\Mvc\Model $$record - * @param array $$parameters - * @return \Phalcon\Mvc\Model\ResultsetInterface + * + * @param mixed $method + * @param mixed $modelName + * @param mixed $modelRelation + * @param \Phalcon\Mvc\ModelInterface $record + * @param mixed $parameters + * @param string $$method + * @param string $$modelName + * @param string $$modelRelation + * @param \Phalcon\Mvc\Model $$record + * @param array $$parameters + * @return \Phalcon\Mvc\Model\ResultsetInterface */ public function getBelongsToRecords($method, $modelName, $modelRelation, \Phalcon\Mvc\ModelInterface $record, $parameters = null); /** * Gets hasMany related records from a model * - * @param mixed $method - * @param mixed $modelName - * @param mixed $modelRelation - * @param mixed $record - * @param mixed $parameters - * @param string $$method - * @param string $$modelName - * @param string $$modelRelation - * @param \Phalcon\Mvc\Model $$record - * @param array $$parameters - * @return \Phalcon\Mvc\Model\ResultsetInterface + * + * @param mixed $method + * @param mixed $modelName + * @param mixed $modelRelation + * @param \Phalcon\Mvc\ModelInterface $record + * @param mixed $parameters + * @param string $$method + * @param string $$modelName + * @param string $$modelRelation + * @param \Phalcon\Mvc\Model $$record + * @param array $$parameters + * @return \Phalcon\Mvc\Model\ResultsetInterface */ public function getHasManyRecords($method, $modelName, $modelRelation, \Phalcon\Mvc\ModelInterface $record, $parameters = null); /** * Gets belongsTo related records from a model * - * @param mixed $method - * @param mixed $modelName - * @param mixed $modelRelation - * @param mixed $record - * @param mixed $parameters - * @param string $$method - * @param string $$modelName - * @param string $$modelRelation - * @param \Phalcon\Mvc\Model $$record - * @param array $$parameters - * @return \Phalcon\Mvc\Model\ResultsetInterface + * + * @param mixed $method + * @param mixed $modelName + * @param mixed $modelRelation + * @param \Phalcon\Mvc\ModelInterface $record + * @param mixed $parameters + * @param string $$method + * @param string $$modelName + * @param string $$modelRelation + * @param \Phalcon\Mvc\Model $$record + * @param array $$parameters + * @return \Phalcon\Mvc\Model\ResultsetInterface */ public function getHasOneRecords($method, $modelName, $modelRelation, \Phalcon\Mvc\ModelInterface $record, $parameters = null); /** * Gets belongsTo relations defined on a model * - * @param mixed $model - * @param \Phalcon\Mvc\ModelInterface $$model - * @return array + * + * @param \Phalcon\Mvc\ModelInterface $model + * @param \Phalcon\Mvc\ModelInterface $$model + * @return array */ public function getBelongsTo(\Phalcon\Mvc\ModelInterface $model); /** * Gets hasMany relations defined on a model * - * @param mixed $model - * @param \Phalcon\Mvc\ModelInterface $$model - * @return array + * + * @param \Phalcon\Mvc\ModelInterface $model + * @param \Phalcon\Mvc\ModelInterface $$model + * @return array */ public function getHasMany(\Phalcon\Mvc\ModelInterface $model); /** * Gets hasOne relations defined on a model * - * @param mixed $model - * @param \Phalcon\Mvc\ModelInterface $$model - * @return array + * + * @param \Phalcon\Mvc\ModelInterface $model + * @param \Phalcon\Mvc\ModelInterface $$model + * @return array */ public function getHasOne(\Phalcon\Mvc\ModelInterface $model); /** * Gets hasOne relations defined on a model * - * @param mixed $model - * @param \Phalcon\Mvc\ModelInterface $$model - * @return array + * + * @param \Phalcon\Mvc\ModelInterface $model + * @param \Phalcon\Mvc\ModelInterface $$model + * @return array */ public function getHasOneAndHasMany(\Phalcon\Mvc\ModelInterface $model); /** * Query all the relationships defined on a model * - * @param mixed $modelName - * @param string $$modelName - * @return \Phalcon\Mvc\Model\RelationInterface[] + * + * @param mixed $modelName + * @param string $$modelName + * @return \Phalcon\Mvc\Model\RelationInterface[] */ public function getRelations($modelName); /** * Query the relations between two models * - * @param mixed $first - * @param mixed $second - * @param string $$first - * @param string $$second - * @return array + * + * @param mixed $first + * @param mixed $second + * @param string $$first + * @param string $$second + * @return array */ public function getRelationsBetween($first, $second); /** * Creates a Phalcon\Mvc\Model\Query without execute it * - * @param mixed $phql - * @param string $$phql - * @return \Phalcon\Mvc\Model\QueryInterface + * + * @param mixed $phql + * @param string $$phql + * @return \Phalcon\Mvc\Model\QueryInterface */ public function createQuery($phql); /** * Creates a Phalcon\Mvc\Model\Query and execute it * - * @param mixed $phql - * @param mixed $placeholders - * @param string $$phql - * @param array $$placeholders - * @return \Phalcon\Mvc\Model\QueryInterface + * + * @param mixed $phql + * @param mixed $placeholders + * @param string $$phql + * @param array $$placeholders + * @return \Phalcon\Mvc\Model\QueryInterface */ public function executeQuery($phql, $placeholders = null); /** * Creates a Phalcon\Mvc\Model\Query\Builder * - * @param mixed $params - * @param string $$params - * @return \Phalcon\Mvc\Model\Query\BuilderInterface + * + * @param mixed $params + * @param string $$params + * @return \Phalcon\Mvc\Model\Query\BuilderInterface */ public function createBuilder($params = null); /** * Binds a behavior to a model * - * @param mixed $model - * @param mixed $behavior + * @param \Phalcon\Mvc\ModelInterface $model + * @param \Phalcon\Mvc\Model\BehaviorInterface $behavior */ public function addBehavior(\Phalcon\Mvc\ModelInterface $model, \Phalcon\Mvc\Model\BehaviorInterface $behavior); @@ -357,9 +376,10 @@ public function addBehavior(\Phalcon\Mvc\ModelInterface $model, \Phalcon\Mvc\Mod * Receives events generated in the models and dispatches them to an events-manager if available * Notify the behaviors that are listening in the model * - * @param mixed $eventName - * @param \Phalcon\Mvc\ModelInterface $model - * @param string $$eventName + * + * @param mixed $eventName + * @param \Phalcon\Mvc\ModelInterface $model + * @param string $$eventName */ public function notifyEvent($eventName, \Phalcon\Mvc\ModelInterface $model); @@ -368,30 +388,33 @@ public function notifyEvent($eventName, \Phalcon\Mvc\ModelInterface $model); * This method expects that the endpoint listeners/behaviors returns true * meaning that a least one is implemented * - * @param \Phalcon\Mvc\ModelInterface $model - * @param mixed $eventName - * @param mixed $data - * @param string $$eventName - * @param array $$data - * @return boolean + * + * @param \Phalcon\Mvc\ModelInterface $model + * @param mixed $eventName + * @param mixed $data + * @param string $$eventName + * @param array $$data + * @return boolean */ public function missingMethod(\Phalcon\Mvc\ModelInterface $model, $eventName, $data); /** * Returns the last query created or executed in the models manager * - * @return \Phalcon\Mvc\Model\QueryInterface + * + * @return \Phalcon\Mvc\Model\QueryInterface */ public function getLastQuery(); /** * Returns a relation by its alias * - * @param string $modelName - * @param string $alias - * @param string $$modelName - * @param string $$alias - * @return \Phalcon\Mvc\Model\Relation + * + * @param string $modelName + * @param string $alias + * @param string $$modelName + * @param string $$alias + * @return \Phalcon\Mvc\Model\Relation */ public function getRelationByAlias($modelName, $alias); diff --git a/ide/stubs/Phalcon/mvc/model/Message.php b/ide/stubs/Phalcon/mvc/model/Message.php index 7b7fe0a7e..9e610f93b 100644 --- a/ide/stubs/Phalcon/mvc/model/Message.php +++ b/ide/stubs/Phalcon/mvc/model/Message.php @@ -4,23 +4,29 @@ /** * Phalcon\Mvc\Model\Message + * * Encapsulates validation info generated before save/delete records fails + * * * use Phalcon\Mvc\Model\Message as Message; + * * class Robots extends \Phalcon\Mvc\Model * { - * public function beforeSave() - * { - * if ($this->name === "Peter") { - * $text = "A robot cannot be named Peter"; - * $field = "name"; - * $type = "InvalidValue"; - * $message = new Message($text, $field, $type); - * $this->appendMessage($message); - * } - * } + * public function beforeSave() + * { + * if ($this->name === "Peter") { + * $text = "A robot cannot be named Peter"; + * $field = "name"; + * $type = "InvalidValue"; + * + * $message = new Message($text, $field, $type); + * + * $this->appendMessage($message); + * } + * } * } * + * */ class Message implements \Phalcon\Mvc\Model\MessageInterface { @@ -43,49 +49,50 @@ class Message implements \Phalcon\Mvc\Model\MessageInterface /** * Phalcon\Mvc\Model\Message constructor * - * @param string $message - * @param string|array $field - * @param string $type - * @param \Phalcon\Mvc\ModelInterface $model - * @param int|null $code + * + * @param string $message + * @param string|array $field + * @param string $type + * @param \Phalcon\Mvc\ModelInterface $model + * @param int|null $code */ public function __construct($message, $field = null, $type = null, $model = null, $code = null) {} /** * Sets message type * - * @param string $type - * @return Message + * @param string $type + * @return Message */ public function setType($type) {} /** * Returns message type * - * @return string + * @return string */ public function getType() {} /** * Sets verbose message * - * @param string $message - * @return Message + * @param string $message + * @return Message */ public function setMessage($message) {} /** * Returns verbose message * - * @return string + * @return string */ public function getMessage() {} /** * Sets field name related to message * - * @param mixed $field - * @return Message + * @param mixed $field + * @return Message */ public function setField($field) {} @@ -97,45 +104,45 @@ public function getField() {} /** * Set the model who generates the message * - * @param mixed $model - * @return Message + * @param \Phalcon\Mvc\ModelInterface $model + * @return Message */ public function setModel(\Phalcon\Mvc\ModelInterface $model) {} /** * Sets code for the message * - * @param int $code - * @return Message + * @param int $code + * @return Message */ public function setCode($code) {} /** * Returns the model that produced the message * - * @return \Phalcon\Mvc\ModelInterface + * @return \Phalcon\Mvc\ModelInterface */ public function getModel() {} /** * Returns the message code * - * @return int + * @return int */ public function getCode() {} /** * Magic __toString method returns verbose message * - * @return string + * @return string */ public function __toString() {} /** * Magic __set_state helps to re-build messages variable exporting * - * @param array $message - * @return Message + * @param array $message + * @return Message */ public static function __set_state(array $message) {} diff --git a/ide/stubs/Phalcon/mvc/model/MessageInterface.php b/ide/stubs/Phalcon/mvc/model/MessageInterface.php index 827f6bab6..7ed4f23d7 100644 --- a/ide/stubs/Phalcon/mvc/model/MessageInterface.php +++ b/ide/stubs/Phalcon/mvc/model/MessageInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\Message + * * Interface for Phalcon\Mvc\Model\Message */ interface MessageInterface @@ -12,57 +13,63 @@ interface MessageInterface /** * Sets message type * - * @param string $type + * + * @param string $type */ public function setType($type); /** * Returns message type * - * @return string + * + * @return string */ public function getType(); /** * Sets verbose message * - * @param string $message + * + * @param string $message */ public function setMessage($message); /** * Returns verbose message * - * @return string + * + * @return string */ public function getMessage(); /** * Sets field name related to message * - * @param string $field + * + * @param string $field */ public function setField($field); /** * Returns field name related to message * - * @return string + * + * @return string */ public function getField(); /** * Magic __toString method returns verbose message * - * @return string + * @return string */ public function __toString(); /** * Magic __set_state helps to recover messages from serialization * - * @param array $message - * @return MessageInterface + * @param array $message + * @return MessageInterface */ public static function __set_state(array $message); diff --git a/ide/stubs/Phalcon/mvc/model/MetaData.php b/ide/stubs/Phalcon/mvc/model/MetaData.php index 98899ce17..b76ffceca 100644 --- a/ide/stubs/Phalcon/mvc/model/MetaData.php +++ b/ide/stubs/Phalcon/mvc/model/MetaData.php @@ -4,15 +4,20 @@ /** * Phalcon\Mvc\Model\MetaData + * *

Because Phalcon\Mvc\Model requires meta-data like field names, data types, primary keys, etc. * this component collect them and store for further querying by Phalcon\Mvc\Model. * Phalcon\Mvc\Model\MetaData can also use adapters to store temporarily or permanently the meta-data.

+ * *

A standard Phalcon\Mvc\Model\MetaData can be used to query model attributes:

+ * * * $metaData = new \Phalcon\Mvc\Model\MetaData\Memory(); + * * $attributes = $metaData->getAttributes( - * new Robots() + * new Robots() * ); + * * print_r($attributes); * */ @@ -82,410 +87,436 @@ abstract class MetaData implements \Phalcon\Di\InjectionAwareInterface, \Phalcon /** * Initialize the metadata for certain table * - * @param mixed $model - * @param mixed $key - * @param mixed $table - * @param mixed $schema + * @param \Phalcon\Mvc\ModelInterface $model + * @param mixed $key + * @param mixed $table + * @param mixed $schema */ protected final function _initialize(\Phalcon\Mvc\ModelInterface $model, $key, $table, $schema) {} /** * Sets the DependencyInjector container * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the DependencyInjector container * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI() {} /** * Set the meta-data extraction strategy * - * @param mixed $strategy + * @param \Phalcon\Mvc\Model\MetaData\StrategyInterface $strategy */ public function setStrategy(\Phalcon\Mvc\Model\MetaData\StrategyInterface $strategy) {} /** * Return the strategy to obtain the meta-data * - * @return \Phalcon\Mvc\Model\MetaData\StrategyInterface + * @return \Phalcon\Mvc\Model\MetaData\StrategyInterface */ public function getStrategy() {} /** * Reads the complete meta-data for certain model + * * * print_r( - * $metaData->readMetaData( - * new Robots() - * ) + * $metaData->readMetaData( + * new Robots() + * ) * ); * * - * @param mixed $model + * @param \Phalcon\Mvc\ModelInterface $model */ public final function readMetaData(\Phalcon\Mvc\ModelInterface $model) {} /** * Reads meta-data for certain model + * * * print_r( - * $metaData->readMetaDataIndex( - * new Robots(), - * 0 - * ) + * $metaData->readMetaDataIndex( + * new Robots(), + * 0 + * ) * ); * * - * @param mixed $model - * @param int $index + * @param \Phalcon\Mvc\ModelInterface $model + * @param int $index */ public final function readMetaDataIndex(\Phalcon\Mvc\ModelInterface $model, $index) {} /** - * Writes meta-data for certain model using a MODEL_* constant + * Writes meta-data for certain model using a MODEL_ constant + * * * print_r( - * $metaData->writeColumnMapIndex( - * new Robots(), - * MetaData::MODELS_REVERSE_COLUMN_MAP, - * [ - * "leName" => "name", - * ] - * ) + * $metaData->writeColumnMapIndex( + * new Robots(), + * MetaData::MODELS_REVERSE_COLUMN_MAP, + * [ + * "leName" => "name", + * ] + * ) * ); * * - * @param mixed $model - * @param int $index - * @param mixed $data + * @param \Phalcon\Mvc\ModelInterface $model + * @param int $index + * @param mixed $data */ public final function writeMetaDataIndex(\Phalcon\Mvc\ModelInterface $model, $index, $data) {} /** * Reads the ordered/reversed column map for certain model + * * * print_r( - * $metaData->readColumnMap( - * new Robots() - * ) + * $metaData->readColumnMap( + * new Robots() + * ) * ); * * - * @param mixed $model + * @param \Phalcon\Mvc\ModelInterface $model */ public final function readColumnMap(\Phalcon\Mvc\ModelInterface $model) {} /** - * Reads column-map information for certain model using a MODEL_* constant + * Reads column-map information for certain model using a MODEL_ constant + * * * print_r( - * $metaData->readColumnMapIndex( - * new Robots(), - * MetaData::MODELS_REVERSE_COLUMN_MAP - * ) + * $metaData->readColumnMapIndex( + * new Robots(), + * MetaData::MODELS_REVERSE_COLUMN_MAP + * ) * ); * * - * @param mixed $model - * @param int $index + * @param \Phalcon\Mvc\ModelInterface $model + * @param int $index */ public final function readColumnMapIndex(\Phalcon\Mvc\ModelInterface $model, $index) {} /** * Returns table attributes names (fields) + * * * print_r( - * $metaData->getAttributes( - * new Robots() - * ) + * $metaData->getAttributes( + * new Robots() + * ) * ); * * - * @param mixed $model - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getAttributes(\Phalcon\Mvc\ModelInterface $model) {} /** * Returns an array of fields which are part of the primary key + * * * print_r( - * $metaData->getPrimaryKeyAttributes( - * new Robots() - * ) + * $metaData->getPrimaryKeyAttributes( + * new Robots() + * ) * ); * * - * @param mixed $model - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getPrimaryKeyAttributes(\Phalcon\Mvc\ModelInterface $model) {} /** * Returns an array of fields which are not part of the primary key + * * * print_r( - * $metaData->getNonPrimaryKeyAttributes( - * new Robots() - * ) + * $metaData->getNonPrimaryKeyAttributes( + * new Robots() + * ) * ); * * - * @param mixed $model - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getNonPrimaryKeyAttributes(\Phalcon\Mvc\ModelInterface $model) {} /** * Returns an array of not null attributes + * * * print_r( - * $metaData->getNotNullAttributes( - * new Robots() - * ) + * $metaData->getNotNullAttributes( + * new Robots() + * ) * ); * * - * @param mixed $model - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getNotNullAttributes(\Phalcon\Mvc\ModelInterface $model) {} /** * Returns attributes and their data types + * * * print_r( - * $metaData->getDataTypes( - * new Robots() - * ) + * $metaData->getDataTypes( + * new Robots() + * ) * ); * * - * @param mixed $model - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getDataTypes(\Phalcon\Mvc\ModelInterface $model) {} /** * Returns attributes which types are numerical + * * * print_r( - * $metaData->getDataTypesNumeric( - * new Robots() - * ) + * $metaData->getDataTypesNumeric( + * new Robots() + * ) * ); * * - * @param mixed $model - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getDataTypesNumeric(\Phalcon\Mvc\ModelInterface $model) {} /** * Returns the name of identity field (if one is present) + * * * print_r( - * $metaData->getIdentityField( - * new Robots() - * ) + * $metaData->getIdentityField( + * new Robots() + * ) * ); * * - * @param \Phalcon\Mvc\ModelInterface $model - * @return string + * + * @param \Phalcon\Mvc\ModelInterface $model + * @return string */ public function getIdentityField(\Phalcon\Mvc\ModelInterface $model) {} /** * Returns attributes and their bind data types + * * * print_r( - * $metaData->getBindTypes( - * new Robots() - * ) + * $metaData->getBindTypes( + * new Robots() + * ) * ); * * - * @param mixed $model - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getBindTypes(\Phalcon\Mvc\ModelInterface $model) {} /** * Returns attributes that must be ignored from the INSERT SQL generation + * * * print_r( - * $metaData->getAutomaticCreateAttributes( - * new Robots() - * ) + * $metaData->getAutomaticCreateAttributes( + * new Robots() + * ) * ); * * - * @param mixed $model - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getAutomaticCreateAttributes(\Phalcon\Mvc\ModelInterface $model) {} /** * Returns attributes that must be ignored from the UPDATE SQL generation + * * * print_r( - * $metaData->getAutomaticUpdateAttributes( - * new Robots() - * ) + * $metaData->getAutomaticUpdateAttributes( + * new Robots() + * ) * ); * * - * @param mixed $model - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getAutomaticUpdateAttributes(\Phalcon\Mvc\ModelInterface $model) {} /** * Set the attributes that must be ignored from the INSERT SQL generation + * * * $metaData->setAutomaticCreateAttributes( - * new Robots(), - * [ - * "created_at" => true, - * ] + * new Robots(), + * [ + * "created_at" => true, + * ] * ); * * - * @param mixed $model - * @param array $attributes + * @param \Phalcon\Mvc\ModelInterface $model + * @param array $attributes */ public function setAutomaticCreateAttributes(\Phalcon\Mvc\ModelInterface $model, array $attributes) {} /** * Set the attributes that must be ignored from the UPDATE SQL generation + * * * $metaData->setAutomaticUpdateAttributes( - * new Robots(), - * [ - * "modified_at" => true, - * ] + * new Robots(), + * [ + * "modified_at" => true, + * ] * ); * * - * @param mixed $model - * @param array $attributes + * @param \Phalcon\Mvc\ModelInterface $model + * @param array $attributes */ public function setAutomaticUpdateAttributes(\Phalcon\Mvc\ModelInterface $model, array $attributes) {} /** * Set the attributes that allow empty string values + * * * $metaData->setEmptyStringAttributes( - * new Robots(), - * [ - * "name" => true, - * ] + * new Robots(), + * [ + * "name" => true, + * ] * ); * * - * @param mixed $model - * @param array $attributes + * @param \Phalcon\Mvc\ModelInterface $model + * @param array $attributes */ public function setEmptyStringAttributes(\Phalcon\Mvc\ModelInterface $model, array $attributes) {} /** * Returns attributes allow empty strings + * * * print_r( - * $metaData->getEmptyStringAttributes( - * new Robots() - * ) + * $metaData->getEmptyStringAttributes( + * new Robots() + * ) * ); * * - * @param mixed $model - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getEmptyStringAttributes(\Phalcon\Mvc\ModelInterface $model) {} /** * Returns attributes (which have default values) and their default values + * * * print_r( - * $metaData->getDefaultValues( - * new Robots() - * ) + * $metaData->getDefaultValues( + * new Robots() + * ) * ); * * - * @param mixed $model - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getDefaultValues(\Phalcon\Mvc\ModelInterface $model) {} /** * Returns the column map if any + * * * print_r( - * $metaData->getColumnMap( - * new Robots() - * ) + * $metaData->getColumnMap( + * new Robots() + * ) * ); * * - * @param mixed $model - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getColumnMap(\Phalcon\Mvc\ModelInterface $model) {} /** * Returns the reverse column map if any + * * * print_r( - * $metaData->getReverseColumnMap( - * new Robots() - * ) + * $metaData->getReverseColumnMap( + * new Robots() + * ) * ); * * - * @param mixed $model - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getReverseColumnMap(\Phalcon\Mvc\ModelInterface $model) {} /** * Check if a model has certain attribute + * * * var_dump( - * $metaData->hasAttribute( - * new Robots(), - * "name" - * ) + * $metaData->hasAttribute( + * new Robots(), + * "name" + * ) * ); * * - * @param mixed $model - * @param string $attribute - * @return bool + * @param \Phalcon\Mvc\ModelInterface $model + * @param string $attribute + * @return bool */ public function hasAttribute(\Phalcon\Mvc\ModelInterface $model, $attribute) {} /** * Checks if the internal meta-data container is empty + * * * var_dump( - * $metaData->isEmpty() + * $metaData->isEmpty() * ); * * - * @return bool + * @return bool */ public function isEmpty() {} /** * Resets internal meta-data in order to regenerate it + * * * $metaData->reset(); * diff --git a/ide/stubs/Phalcon/mvc/model/MetaDataInterface.php b/ide/stubs/Phalcon/mvc/model/MetaDataInterface.php index 1226fc980..07373e071 100644 --- a/ide/stubs/Phalcon/mvc/model/MetaDataInterface.php +++ b/ide/stubs/Phalcon/mvc/model/MetaDataInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\MetaDataInterface + * * Interface for Phalcon\Mvc\Model\MetaData */ interface MetaDataInterface @@ -12,208 +13,225 @@ interface MetaDataInterface /** * Set the meta-data extraction strategy * - * @param mixed $strategy + * @param \Phalcon\Mvc\Model\MetaData\StrategyInterface $strategy */ public function setStrategy(\Phalcon\Mvc\Model\MetaData\StrategyInterface $strategy); /** * Return the strategy to obtain the meta-data * - * @return \Phalcon\Mvc\Model\MetaData\StrategyInterface + * + * @return \Phalcon\Mvc\Model\MetaData\StrategyInterface */ public function getStrategy(); /** * Reads meta-data for certain model * - * @param \Phalcon\Mvc\ModelInterface $model - * @return array + * + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function readMetaData(\Phalcon\Mvc\ModelInterface $model); /** - * Reads meta-data for certain model using a MODEL_* constant + * Reads meta-data for certain model using a MODEL_ constant + * * - * @param \Phalcon\Mvc\ModelInterface $model - * @param int $index - * @return mixed + * @param \Phalcon\Mvc\ModelInterface $model + * @param int $index + * @return mixed */ public function readMetaDataIndex(\Phalcon\Mvc\ModelInterface $model, $index); /** - * Writes meta-data for certain model using a MODEL_* constant + * Writes meta-data for certain model using a MODEL_ constant * - * @param \Phalcon\Mvc\ModelInterface $model - * @param int $index - * @param mixed $data + * + * @param \Phalcon\Mvc\ModelInterface $model + * @param int $index + * @param mixed $data */ public function writeMetaDataIndex(\Phalcon\Mvc\ModelInterface $model, $index, $data); /** * Reads the ordered/reversed column map for certain model * - * @param \Phalcon\Mvc\ModelInterface $model - * @return array + * + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function readColumnMap(\Phalcon\Mvc\ModelInterface $model); /** - * Reads column-map information for certain model using a MODEL_* constant + * Reads column-map information for certain model using a MODEL_ constant * - * @param \Phalcon\Mvc\ModelInterface $model - * @param int $index + * + * @param \Phalcon\Mvc\ModelInterface $model + * @param int $index */ public function readColumnMapIndex(\Phalcon\Mvc\ModelInterface $model, $index); /** * Returns table attributes names (fields) * - * @param \Phalcon\Mvc\ModelInterface $model - * @return array + * + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getAttributes(\Phalcon\Mvc\ModelInterface $model); /** * Returns an array of fields which are part of the primary key * - * @param \Phalcon\Mvc\ModelInterface $model - * @return array + * + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getPrimaryKeyAttributes(\Phalcon\Mvc\ModelInterface $model); /** * Returns an array of fields which are not part of the primary key * - * @param \Phalcon\Mvc\ModelInterface $model - * @return array + * + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getNonPrimaryKeyAttributes(\Phalcon\Mvc\ModelInterface $model); /** * Returns an array of not null attributes * - * @param \Phalcon\Mvc\ModelInterface $model - * @return array + * + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getNotNullAttributes(\Phalcon\Mvc\ModelInterface $model); /** * Returns attributes and their data types * - * @param \Phalcon\Mvc\ModelInterface $model - * @return array + * + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getDataTypes(\Phalcon\Mvc\ModelInterface $model); /** * Returns attributes which types are numerical * - * @param \Phalcon\Mvc\ModelInterface $model - * @return array + * + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getDataTypesNumeric(\Phalcon\Mvc\ModelInterface $model); /** * Returns the name of identity field (if one is present) * - * @param \Phalcon\Mvc\ModelInterface $model - * @return string + * + * @param \Phalcon\Mvc\ModelInterface $model + * @return string */ public function getIdentityField(\Phalcon\Mvc\ModelInterface $model); /** * Returns attributes and their bind data types * - * @param \Phalcon\Mvc\ModelInterface $model - * @return array + * + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getBindTypes(\Phalcon\Mvc\ModelInterface $model); /** * Returns attributes that must be ignored from the INSERT SQL generation * - * @param \Phalcon\Mvc\ModelInterface $model - * @return array + * + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getAutomaticCreateAttributes(\Phalcon\Mvc\ModelInterface $model); /** * Returns attributes that must be ignored from the UPDATE SQL generation * - * @param \Phalcon\Mvc\ModelInterface $model - * @return array + * + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getAutomaticUpdateAttributes(\Phalcon\Mvc\ModelInterface $model); /** * Set the attributes that must be ignored from the INSERT SQL generation * - * @param mixed $model - * @param array $attributes + * @param \Phalcon\Mvc\ModelInterface $model + * @param array $attributes */ public function setAutomaticCreateAttributes(\Phalcon\Mvc\ModelInterface $model, array $attributes); /** * Set the attributes that must be ignored from the UPDATE SQL generation * - * @param mixed $model - * @param array $attributes + * @param \Phalcon\Mvc\ModelInterface $model + * @param array $attributes */ public function setAutomaticUpdateAttributes(\Phalcon\Mvc\ModelInterface $model, array $attributes); /** * Set the attributes that allow empty string values * - * @param mixed $model - * @param array $attributes + * @param \Phalcon\Mvc\ModelInterface $model + * @param array $attributes */ public function setEmptyStringAttributes(\Phalcon\Mvc\ModelInterface $model, array $attributes); /** * Returns attributes allow empty strings * - * @param mixed $model - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getEmptyStringAttributes(\Phalcon\Mvc\ModelInterface $model); /** * Returns attributes (which have default values) and their default values * - * @param mixed $model - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getDefaultValues(\Phalcon\Mvc\ModelInterface $model); /** * Returns the column map if any * - * @param mixed $model - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getColumnMap(\Phalcon\Mvc\ModelInterface $model); /** * Returns the reverse column map if any * - * @param mixed $model - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @return array */ public function getReverseColumnMap(\Phalcon\Mvc\ModelInterface $model); /** * Check if a model has certain attribute * - * @param mixed $model - * @param string $attribute - * @return bool + * @param \Phalcon\Mvc\ModelInterface $model + * @param string $attribute + * @return bool */ public function hasAttribute(\Phalcon\Mvc\ModelInterface $model, $attribute); /** * Checks if the internal meta-data container is empty * - * @return boolean + * + * @return boolean */ public function isEmpty(); @@ -225,16 +243,18 @@ public function reset(); /** * Reads meta-data from the adapter * - * @param string $key - * @return array + * + * @param string $key + * @return array */ public function read($key); /** * Writes meta-data to the adapter * - * @param string $key - * @param array $data + * + * @param string $key + * @param array $data */ public function write($key, $data); diff --git a/ide/stubs/Phalcon/mvc/model/Query.php b/ide/stubs/Phalcon/mvc/model/Query.php index 7e01ffadd..b54257f09 100644 --- a/ide/stubs/Phalcon/mvc/model/Query.php +++ b/ide/stubs/Phalcon/mvc/model/Query.php @@ -4,20 +4,24 @@ /** * Phalcon\Mvc\Model\Query + * * This class takes a PHQL intermediate representation and executes it. + * * - * $phql = "SELECT c.price*0.16 AS taxes, c.* FROM Cars AS c JOIN Brands AS b - * WHERE b.name = :name: ORDER BY c.name"; + * $phql = "SELECT c.price0.16 AS taxes, c. FROM Cars AS c JOIN Brands AS b + * WHERE b.name = :name: ORDER BY c.name"; + * * $result = $manager->executeQuery( - * $phql, - * [ - * "name" => "Lamborghini", - * ] + * $phql, + * [ + * "name" => "Lamborghini", + * ] * ); + * * foreach ($result as $row) { - * echo "Name: ", $row->cars->name, "\n"; - * echo "Price: ", $row->cars->price, "\n"; - * echo "Taxes: ", $row->taxes, "\n"; + * echo "Name: ", $row->cars->name, "\n"; + * echo "Price: ", $row->cars->price, "\n"; + * echo "Taxes: ", $row->taxes, "\n"; * } * */ @@ -105,79 +109,81 @@ class Query implements \Phalcon\Mvc\Model\QueryInterface, \Phalcon\Di\InjectionA /** * Phalcon\Mvc\Model\Query constructor * - * @param string $phql - * @param \Phalcon\DiInterface $dependencyInjector - * @param mixed $options + * + * @param string $phql + * @param \Phalcon\DiInterface $dependencyInjector + * @param mixed $options */ public function __construct($phql = null, \Phalcon\DiInterface $dependencyInjector = null, $options = null) {} /** * Sets the dependency injection container * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the dependency injection container * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI() {} /** * Tells to the query if only the first row in the resultset must be returned * - * @param bool $uniqueRow - * @return Query + * @param bool $uniqueRow + * @return Query */ public function setUniqueRow($uniqueRow) {} /** * Check if the query is programmed to get only the first row in the resultset * - * @return bool + * @return bool */ public function getUniqueRow() {} /** * Replaces the model's name to its source name in a qualified-name expression * - * @param array $expr - * @return array + * @param array $expr + * @return array */ protected final function _getQualified(array $expr) {} /** * Resolves an expression in a single call argument * - * @param array $argument - * @return array + * @param array $argument + * @return array */ protected final function _getCallArgument(array $argument) {} /** * Resolves an expression in a single call argument * - * @param array $expr - * @return array + * @param array $expr + * @return array */ protected final function _getCaseExpression(array $expr) {} /** * Resolves an expression in a single call argument * - * @param array $expr - * @return array + * @param array $expr + * @return array */ protected final function _getFunctionCall(array $expr) {} /** * Resolves an expression from its intermediate code into a string * - * @param array $expr - * @param boolean $quoting - * @return string + * + * @param array $expr + * @param boolean $quoting + * @return string */ protected final function _getExpression($expr, $quoting = true) {} @@ -185,121 +191,127 @@ protected final function _getExpression($expr, $quoting = true) {} * Resolves a column from its intermediate representation into an array used to determine * if the resultset produced is simple or complex * - * @param array $column - * @return array + * @param array $column + * @return array */ protected final function _getSelectColumn(array $column) {} /** * Resolves a table in a SELECT statement checking if the model exists * - * @param \Phalcon\Mvc\Model\ManagerInterface $manager - * @param array $qualifiedName - * @return string + * + * @param \Phalcon\Mvc\Model\ManagerInterface $manager + * @param array $qualifiedName + * @return string */ protected final function _getTable(\Phalcon\Mvc\Model\ManagerInterface $manager, $qualifiedName) {} /** * Resolves a JOIN clause checking if the associated models exist * - * @param mixed $manager - * @param mixed $join - * @return array + * @param \Phalcon\Mvc\Model\ManagerInterface $manager + * @param mixed $join + * @return array */ protected final function _getJoin(\Phalcon\Mvc\Model\ManagerInterface $manager, $join) {} /** * Resolves a JOIN type * - * @param array $join - * @return string + * + * @param array $join + * @return string */ protected final function _getJoinType($join) {} /** * Resolves joins involving has-one/belongs-to/has-many relations * - * @param string $joinType - * @param string $joinSource - * @param string $modelAlias - * @param string $joinAlias - * @param \Phalcon\Mvc\Model\RelationInterface $relation - * @return array + * + * @param string $joinType + * @param string $joinSource + * @param string $modelAlias + * @param string $joinAlias + * @param \Phalcon\Mvc\Model\RelationInterface $relation + * @return array */ protected final function _getSingleJoin($joinType, $joinSource, $modelAlias, $joinAlias, \Phalcon\Mvc\Model\RelationInterface $relation) {} /** * Resolves joins involving many-to-many relations * - * @param string $joinType - * @param string $joinSource - * @param string $modelAlias - * @param string $joinAlias - * @param \Phalcon\Mvc\Model\RelationInterface $relation - * @return array + * + * @param string $joinType + * @param string $joinSource + * @param string $modelAlias + * @param string $joinAlias + * @param \Phalcon\Mvc\Model\RelationInterface $relation + * @return array */ protected final function _getMultiJoin($joinType, $joinSource, $modelAlias, $joinAlias, \Phalcon\Mvc\Model\RelationInterface $relation) {} /** * Processes the JOINs in the query returning an internal representation for the database dialect * - * @param array $select - * @return array + * + * @param array $select + * @return array */ protected final function _getJoins($select) {} /** * Returns a processed order clause for a SELECT statement * - * @param mixed $order - * @param array|string $$order - * @return array + * + * @param mixed $order + * @param array|string $$order + * @return array */ protected final function _getOrderClause($order) {} /** * Returns a processed group clause for a SELECT statement * - * @param array $group - * @return array + * @param array $group + * @return array */ protected final function _getGroupClause(array $group) {} /** * Returns a processed limit clause for a SELECT statement * - * @param array $limitClause - * @return array + * @param array $limitClause + * @return array */ protected final function _getLimitClause(array $limitClause) {} /** * Analyzes a SELECT intermediate code and produces an array to be executed later * - * @param mixed $ast - * @param mixed $merge - * @return array + * @param mixed $ast + * @param mixed $merge + * @return array */ protected final function _prepareSelect($ast = null, $merge = null) {} /** * Analyzes an INSERT intermediate code and produces an array to be executed later * - * @return array + * @return array */ protected final function _prepareInsert() {} /** * Analyzes an UPDATE intermediate code and produces an array to be executed later * - * @return array + * @return array */ protected final function _prepareUpdate() {} /** * Analyzes a DELETE intermediate code and produces an array to be executed later * - * @return array + * @return array */ protected final function _prepareDelete() {} @@ -307,176 +319,186 @@ protected final function _prepareDelete() {} * Parses the intermediate code produced by Phalcon\Mvc\Model\Query\Lang generating another * intermediate representation that could be executed by Phalcon\Mvc\Model\Query * - * @return array + * @return array */ public function parse() {} /** * Returns the current cache backend instance * - * @return \Phalcon\Cache\BackendInterface + * @return \Phalcon\Cache\BackendInterface */ public function getCache() {} /** * Executes the SELECT intermediate representation producing a Phalcon\Mvc\Model\Resultset * - * @param mixed $intermediate - * @param mixed $bindParams - * @param mixed $bindTypes - * @param bool $simulate - * @return array|\Phalcon\Mvc\Model\ResultsetInterface + * @param mixed $intermediate + * @param mixed $bindParams + * @param mixed $bindTypes + * @param bool $simulate + * @return array|\Phalcon\Mvc\Model\ResultsetInterface */ protected final function _executeSelect($intermediate, $bindParams, $bindTypes, $simulate = false) {} /** * Executes the INSERT intermediate representation producing a Phalcon\Mvc\Model\Query\Status * - * @param array $intermediate - * @param array $bindParams - * @param array $bindTypes - * @return \Phalcon\Mvc\Model\Query\StatusInterface + * + * @param array $intermediate + * @param array $bindParams + * @param array $bindTypes + * @return \Phalcon\Mvc\Model\Query\StatusInterface */ protected final function _executeInsert($intermediate, $bindParams, $bindTypes) {} /** * Executes the UPDATE intermediate representation producing a Phalcon\Mvc\Model\Query\Status * - * @param array $intermediate - * @param array $bindParams - * @param array $bindTypes - * @return \Phalcon\Mvc\Model\Query\StatusInterface + * + * @param array $intermediate + * @param array $bindParams + * @param array $bindTypes + * @return \Phalcon\Mvc\Model\Query\StatusInterface */ protected final function _executeUpdate($intermediate, $bindParams, $bindTypes) {} /** * Executes the DELETE intermediate representation producing a Phalcon\Mvc\Model\Query\Status * - * @param array $intermediate - * @param array $bindParams - * @param array $bindTypes - * @return \Phalcon\Mvc\Model\Query\StatusInterface + * + * @param array $intermediate + * @param array $bindParams + * @param array $bindTypes + * @return \Phalcon\Mvc\Model\Query\StatusInterface */ protected final function _executeDelete($intermediate, $bindParams, $bindTypes) {} /** * Query the records on which the UPDATE/DELETE operation well be done * - * @param \Phalcon\Mvc\ModelInterface $model - * @param array $intermediate - * @param array $bindParams - * @param array $bindTypes - * @return \Phalcon\Mvc\Model\ResultsetInterface + * + * @param \Phalcon\Mvc\ModelInterface $model + * @param array $intermediate + * @param array $bindParams + * @param array $bindTypes + * @return \Phalcon\Mvc\Model\ResultsetInterface */ protected final function _getRelatedRecords(\Phalcon\Mvc\ModelInterface $model, $intermediate, $bindParams, $bindTypes) {} /** * Executes a parsed PHQL statement * - * @param array $bindParams - * @param array $bindTypes - * @return mixed + * + * @param array $bindParams + * @param array $bindTypes + * @return mixed */ public function execute($bindParams = null, $bindTypes = null) {} /** * Executes the query returning the first result * - * @param array $bindParams - * @param array $bindTypes - * @return \Phalcon\Mvc\ModelInterface + * + * @param array $bindParams + * @param array $bindTypes + * @return \Phalcon\Mvc\ModelInterface */ public function getSingleResult($bindParams = null, $bindTypes = null) {} /** * Sets the type of PHQL statement to be executed * - * @param int $type - * @return Query + * @param int $type + * @return Query */ public function setType($type) {} /** * Gets the type of PHQL statement executed * - * @return int + * @return int */ public function getType() {} /** * Set default bind parameters * - * @param array $bindParams - * @param bool $merge - * @return Query + * @param array $bindParams + * @param bool $merge + * @return Query */ public function setBindParams(array $bindParams, $merge = false) {} /** * Returns default bind params * - * @return array + * + * @return array */ public function getBindParams() {} /** * Set default bind parameters * - * @param array $bindTypes - * @param bool $merge - * @return Query + * @param array $bindTypes + * @param bool $merge + * @return Query */ public function setBindTypes(array $bindTypes, $merge = false) {} /** * Set SHARED LOCK clause * - * @param bool $sharedLock - * @return Query + * @param bool $sharedLock + * @return Query */ public function setSharedLock($sharedLock = false) {} /** * Returns default bind types * - * @return array + * + * @return array */ public function getBindTypes() {} /** * Allows to set the IR to be executed * - * @param array $intermediate - * @return Query + * @param array $intermediate + * @return Query */ public function setIntermediate(array $intermediate) {} /** * Returns the intermediate representation of the PHQL statement * - * @return array + * + * @return array */ public function getIntermediate() {} /** * Sets the cache parameters of the query * - * @param mixed $cacheOptions - * @return Query + * @param mixed $cacheOptions + * @return Query */ public function cache($cacheOptions) {} /** * Returns the current cache options * - * @param array + * + * @param array */ public function getCacheOptions() {} /** * Returns the SQL to be generated by the internal PHQL (only works in SELECT statements) * - * @return array + * @return array */ public function getSql() {} diff --git a/ide/stubs/Phalcon/mvc/model/QueryInterface.php b/ide/stubs/Phalcon/mvc/model/QueryInterface.php index 058d68f18..5dea4d98e 100644 --- a/ide/stubs/Phalcon/mvc/model/QueryInterface.php +++ b/ide/stubs/Phalcon/mvc/model/QueryInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\QueryInterface + * * Interface for Phalcon\Mvc\Model\Query */ interface QueryInterface @@ -13,46 +14,52 @@ interface QueryInterface * Parses the intermediate code produced by Phalcon\Mvc\Model\Query\Lang generating another * intermediate representation that could be executed by Phalcon\Mvc\Model\Query * - * @return array + * + * @return array */ public function parse(); /** * Sets the cache parameters of the query * - * @param array $cacheOptions - * @return \Phalcon\Mvc\Model\Query + * + * @param array $cacheOptions + * @return \Phalcon\Mvc\Model\Query */ public function cache($cacheOptions); /** * Returns the current cache options * - * @param array + * + * @param array */ public function getCacheOptions(); /** * Tells to the query if only the first row in the resultset must be returned * - * @param boolean $uniqueRow - * @return \Phalcon\Mvc\Model\Query + * + * @param boolean $uniqueRow + * @return \Phalcon\Mvc\Model\Query */ public function setUniqueRow($uniqueRow); /** * Check if the query is programmed to get only the first row in the resultset * - * @return boolean + * + * @return boolean */ public function getUniqueRow(); /** * Executes a parsed PHQL statement * - * @param array $bindParams - * @param array $bindTypes - * @return mixed + * + * @param array $bindParams + * @param array $bindTypes + * @return mixed */ public function execute($bindParams = null, $bindTypes = null); diff --git a/ide/stubs/Phalcon/mvc/model/Relation.php b/ide/stubs/Phalcon/mvc/model/Relation.php index c458a303a..be14c4e8e 100644 --- a/ide/stubs/Phalcon/mvc/model/Relation.php +++ b/ide/stubs/Phalcon/mvc/model/Relation.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\Relation + * * This class represents a relationship between two models */ class Relation implements \Phalcon\Mvc\Model\RelationInterface @@ -60,55 +61,60 @@ class Relation implements \Phalcon\Mvc\Model\RelationInterface /** * Phalcon\Mvc\Model\Relation constructor * - * @param int $type - * @param string $referencedModel - * @param string|array $fields - * @param string|array $referencedFields - * @param array $options + * + * @param int $type + * @param string $referencedModel + * @param string|array $fields + * @param string|array $referencedFields + * @param array $options */ public function __construct($type, $referencedModel, $fields, $referencedFields, $options = null) {} /** - * Sets the intermediate model data for has-*-through relations + * Sets the intermediate model data for has--through relations + * * - * @param string|array $intermediateFields - * @param string $intermediateModel - * @param string $intermediateReferencedFields + * @param string|array $intermediateFields + * @param string $intermediateModel + * @param string $intermediateReferencedFields */ public function setIntermediateRelation($intermediateFields, $intermediateModel, $intermediateReferencedFields) {} /** * Returns the relation type * - * @return int + * @return int */ public function getType() {} /** * Returns the referenced model * - * @return string + * @return string */ public function getReferencedModel() {} /** * Returns the fields * - * @return string|array + * + * @return string|array */ public function getFields() {} /** * Returns the referenced fields * - * @return string|array + * + * @return string|array */ public function getReferencedFields() {} /** * Returns the options * - * @return string|array + * + * @return string|array */ public function getOptions() {} @@ -116,63 +122,67 @@ public function getOptions() {} * Returns an option by the specified name * If the option doesn't exist null is returned * - * @param string $name + * @param string $name */ public function getOption($name) {} /** * Check whether the relation act as a foreign key * - * @return bool + * @return bool */ public function isForeignKey() {} /** * Returns the foreign key configuration * - * @return string|array + * + * @return string|array */ public function getForeignKey() {} /** * Returns parameters that must be always used when the related records are obtained * - * @return array + * + * @return array */ public function getParams() {} /** * Check whether the relation is a 'many-to-many' relation or not * - * @return bool + * @return bool */ public function isThrough() {} /** * Check if records returned by getting belongs-to/has-many are implicitly cached during the current request * - * @return bool + * @return bool */ public function isReusable() {} /** - * Gets the intermediate fields for has-*-through relations + * Gets the intermediate fields for has--through relations * - * @return string|array + * + * @return string|array */ public function getIntermediateFields() {} /** - * Gets the intermediate model for has-*-through relations + * Gets the intermediate model for has--through relations * - * @return string + * @return string */ public function getIntermediateModel() {} /** - * Gets the intermediate referenced fields for has-*-through relations + * Gets the intermediate referenced fields for has--through relations + * * - * @return string|array + * @return string|array */ public function getIntermediateReferencedFields() {} diff --git a/ide/stubs/Phalcon/mvc/model/RelationInterface.php b/ide/stubs/Phalcon/mvc/model/RelationInterface.php index 870c2896a..4077c3f8f 100644 --- a/ide/stubs/Phalcon/mvc/model/RelationInterface.php +++ b/ide/stubs/Phalcon/mvc/model/RelationInterface.php @@ -4,59 +4,64 @@ /** * Phalcon\Mvc\Model\RelationInterface + * * Interface for Phalcon\Mvc\Model\Relation */ interface RelationInterface { /** - * Sets the intermediate model dat for has-*-through relations + * Sets the intermediate model dat for has--through relations * - * @param string|array $intermediateFields - * @param string $intermediateModel - * @param string|array $intermediateReferencedFields + * + * @param string|array $intermediateFields + * @param string $intermediateModel + * @param string|array $intermediateReferencedFields */ public function setIntermediateRelation($intermediateFields, $intermediateModel, $intermediateReferencedFields); /** * Check if records returned by getting belongs-to/has-many are implicitly cached during the current request * - * @return bool + * @return bool */ public function isReusable(); /** * Returns the relations type * - * @return int + * @return int */ public function getType(); /** * Returns the referenced model * - * @return string + * @return string */ public function getReferencedModel(); /** * Returns the fields * - * @return string|array + * + * @return string|array */ public function getFields(); /** * Returns the referenced fields * - * @return string|array + * + * @return string|array */ public function getReferencedFields(); /** * Returns the options * - * @return string|array + * + * @return string|array */ public function getOptions(); @@ -64,49 +69,52 @@ public function getOptions(); * Returns an option by the specified name * If the option doesn't exist null is returned * - * @param string $name + * @param string $name */ public function getOption($name); /** * Check whether the relation act as a foreign key * - * @return bool + * @return bool */ public function isForeignKey(); /** * Returns the foreign key configuration * - * @return string|array + * + * @return string|array */ public function getForeignKey(); /** * Check whether the relation is a 'many-to-many' relation or not * - * @return bool + * @return bool */ public function isThrough(); /** - * Gets the intermediate fields for has-*-through relations + * Gets the intermediate fields for has--through relations + * * - * @return string|array + * @return string|array */ public function getIntermediateFields(); /** - * Gets the intermediate model for has-*-through relations + * Gets the intermediate model for has--through relations * - * @return string + * @return string */ public function getIntermediateModel(); /** - * Gets the intermediate referenced fields for has-*-through relations + * Gets the intermediate referenced fields for has--through relations + * * - * @return string|array + * @return string|array */ public function getIntermediateReferencedFields(); diff --git a/ide/stubs/Phalcon/mvc/model/ResultInterface.php b/ide/stubs/Phalcon/mvc/model/ResultInterface.php index 044776847..484d95930 100644 --- a/ide/stubs/Phalcon/mvc/model/ResultInterface.php +++ b/ide/stubs/Phalcon/mvc/model/ResultInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\ResultInterface + * * All single objects passed as base objects to Resultsets must implement this interface */ interface ResultInterface @@ -12,7 +13,8 @@ interface ResultInterface /** * Sets the object's state * - * @param boolean $dirtyState + * + * @param boolean $dirtyState */ public function setDirtyState($dirtyState); diff --git a/ide/stubs/Phalcon/mvc/model/Resultset.php b/ide/stubs/Phalcon/mvc/model/Resultset.php index bdbdf263a..5e9aa2f2c 100644 --- a/ide/stubs/Phalcon/mvc/model/Resultset.php +++ b/ide/stubs/Phalcon/mvc/model/Resultset.php @@ -4,33 +4,42 @@ /** * Phalcon\Mvc\Model\Resultset + * * This component allows to Phalcon\Mvc\Model returns large resultsets with the minimum memory consumption * Resultsets can be traversed using a standard foreach or a while statement. If a resultset is serialized * it will dump all the rows into a big array. Then unserialize will retrieve the rows as they were before * serializing. + * * + * * // Using a standard foreach * $robots = Robots::find( - * [ - * "type = 'virtual'", - * "order" => "name", - * ] + * [ + * "type = 'virtual'", + * "order" => "name", + * ] * ); + * * foreach ($robots as robot) { - * echo robot->name, "\n"; + * echo robot->name, "\n"; * } + * * // Using a while * $robots = Robots::find( - * [ - * "type = 'virtual'", - * "order" => "name", - * ] + * [ + * "type = 'virtual'", + * "order" => "name", + * ] * ); + * * $robots->rewind(); + * * while ($robots->valid()) { - * $robot = $robots->current(); - * echo $robot->name, "\n"; - * $robots->next(); + * $robot = $robots->current(); + * + * echo $robot->name, "\n"; + * + * $robots->next(); * } * */ @@ -87,8 +96,9 @@ abstract class Resultset implements \Phalcon\Mvc\Model\ResultsetInterface, \Iter /** * Phalcon\Mvc\Model\Resultset constructor * - * @param \Phalcon\Db\ResultInterface|false $result - * @param \Phalcon\Cache\BackendInterface $cache + * + * @param \Phalcon\Db\ResultInterface|false $result + * @param \Phalcon\Cache\BackendInterface $cache */ public function __construct($result, \Phalcon\Cache\BackendInterface $cache = null) {} @@ -100,14 +110,14 @@ public function next() {} /** * Check whether internal resource has rows to fetch * - * @return bool + * @return bool */ public function valid() {} /** * Gets pointer number of active row in the resultset * - * @return int|null + * @return int|null */ public function key() {} @@ -120,156 +130,162 @@ public final function rewind() {} * Changes internal pointer to a specific position in the resultset * Set new position if required and set this->_row * - * @param int $position + * @param int $position */ public final function seek($position) {} /** * Counts how many rows are in the resultset * - * @return int + * @return int */ public final function count() {} /** * Checks whether offset exists in the resultset * - * @param int $index - * @return bool + * @param int $index + * @return bool */ public function offsetExists($index) {} /** * Gets row in a specific position of the resultset * - * @param int $index - * @return bool|\Phalcon\Mvc\ModelInterface + * @param int $index + * @return bool|\Phalcon\Mvc\ModelInterface */ public function offsetGet($index) {} /** * Resultsets cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface * - * @param int $index - * @param \Phalcon\Mvc\ModelInterface $value + * + * @param int $index + * @param \Phalcon\Mvc\ModelInterface $value */ 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 int $offset */ public function offsetUnset($offset) {} /** * Returns the internal type of data retrieval that the resultset is using * - * @return int + * @return int */ public function getType() {} /** * Get first row in the resultset * - * @return bool|\Phalcon\Mvc\ModelInterface + * @return bool|\Phalcon\Mvc\ModelInterface */ public function getFirst() {} /** * Get last row in the resultset * - * @return bool|\Phalcon\Mvc\ModelInterface + * @return bool|\Phalcon\Mvc\ModelInterface */ public function getLast() {} /** * Set if the resultset is fresh or an old one cached * - * @param bool $isFresh - * @return Resultset + * @param bool $isFresh + * @return Resultset */ public function setIsFresh($isFresh) {} /** * Tell if the resultset if fresh or an old one cached * - * @return bool + * @return bool */ public function isFresh() {} /** * Sets the hydration mode in the resultset * - * @param int $hydrateMode - * @return Resultset + * @param int $hydrateMode + * @return Resultset */ public function setHydrateMode($hydrateMode) {} /** * Returns the current hydration mode * - * @return int + * @return int */ public function getHydrateMode() {} /** * Returns the associated cache for the resultset * - * @return \Phalcon\Cache\BackendInterface + * @return \Phalcon\Cache\BackendInterface */ public function getCache() {} /** * Returns the error messages produced by a batch operation * - * @return MessageInterface[] + * @return \Phalcon\Mvc\Model\MessageInterface[] */ public function getMessages() {} /** * Updates every record in the resultset * - * @param array $data - * @param \Closure $conditionCallback - * @return boolean + * + * @param array $data + * @param \Closure $conditionCallback + * @return bool */ public function update($data, \Closure $conditionCallback = null) {} /** * Deletes every record in the resultset * - * @param mixed $conditionCallback - * @return bool + * @param \Closure $conditionCallback + * @return bool */ public function delete(\Closure $conditionCallback = null) {} /** * Filters a resultset returning only those the developer requires + * * * $filtered = $robots->filter( - * function ($robot) { - * if ($robot->id < 3) { - * return $robot; - * } - * } + * function ($robot) { + * if ($robot->id < 3) { + * return $robot; + * } + * } * ); * * - * @param callback $filter - * @return \Phalcon\Mvc\Model[] + * + * @param callback $filter + * @return array */ public function filter($filter) {} /** * Returns serialised model objects as array for json_encode. * Calls jsonSerialize on each object if present + * * * $robots = Robots::find(); * echo json_encode($robots); * * - * @return array + * + * @return array */ public function jsonSerialize() {} diff --git a/ide/stubs/Phalcon/mvc/model/ResultsetInterface.php b/ide/stubs/Phalcon/mvc/model/ResultsetInterface.php index 58903e36e..c94ba32db 100644 --- a/ide/stubs/Phalcon/mvc/model/ResultsetInterface.php +++ b/ide/stubs/Phalcon/mvc/model/ResultsetInterface.php @@ -4,7 +4,9 @@ /** * Phalcon\Mvc\Model\ResultsetInterface + * * Interface for Phalcon\Mvc\Model\Resultset + * */ interface ResultsetInterface { @@ -12,42 +14,45 @@ interface ResultsetInterface /** * Returns the internal type of data retrieval that the resultset is using * - * @return int + * @return int */ public function getType(); /** * Get first row in the resultset * - * @return \Phalcon\Mvc\ModelInterface + * + * @return \Phalcon\Mvc\ModelInterface */ public function getFirst(); /** * Get last row in the resultset * - * @return \Phalcon\Mvc\ModelInterface + * + * @return \Phalcon\Mvc\ModelInterface */ public function getLast(); /** * Set if the resultset is fresh or an old one cached * - * @param bool $isFresh + * @param bool $isFresh */ public function setIsFresh($isFresh); /** * Tell if the resultset if fresh or an old one cached * - * @return bool + * @return bool */ public function isFresh(); /** * Returns the associated cache for the resultset * - * @return \Phalcon\Cache\BackendInterface + * + * @return \Phalcon\Cache\BackendInterface */ public function getCache(); @@ -55,7 +60,7 @@ public function getCache(); * Returns a complete resultset as an array, if the resultset has a big number of rows * it could consume more memory than currently it does. * - * @return array + * @return array */ public function toArray(); diff --git a/ide/stubs/Phalcon/mvc/model/Row.php b/ide/stubs/Phalcon/mvc/model/Row.php index 38309e970..99ee7ebe0 100644 --- a/ide/stubs/Phalcon/mvc/model/Row.php +++ b/ide/stubs/Phalcon/mvc/model/Row.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\Row + * * This component allows Phalcon\Mvc\Model to return rows without an associated entity. * This objects implements the ArrayAccess interface to allow access the object as object->x or array[x]. */ @@ -13,76 +14,86 @@ class Row implements \Phalcon\Mvc\EntityInterface, \Phalcon\Mvc\Model\ResultInte /** * Set the current object's state * - * @param int $dirtyState - * @return bool + * @param int $dirtyState + * @return bool */ public function setDirtyState($dirtyState) {} /** * Checks whether offset exists in the row * - * @param mixed $index - * @param string|int $$index - * @return boolean + * + * @param mixed $index + * @param string|int $$index + * @return bool */ public function offsetExists($index) {} /** * Gets a record in a specific position of the row * - * @param string|int $index - * @return string|Phalcon\Mvc\ModelInterface + * + * @param string|int $index + * @return string|Phalcon\Mvc\ModelInterface */ public function offsetGet($index) {} /** * Rows cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface * - * @param string|int $index - * @param \Phalcon\Mvc\ModelInterface $value + * + * @param string|int $index + * @param \Phalcon\Mvc\ModelInterface $value */ public function offsetSet($index, $value) {} /** * Rows cannot be changed. It has only been implemented to meet the definition of the ArrayAccess interface * - * @param string|int $offset + * + * @param string|int $offset */ public function offsetUnset($offset) {} /** * Reads an attribute value by its name + * * * echo $robot->readAttribute("name"); * * - * @param string $attribute - * @return mixed + * + * @param string $attribute + * @return mixed */ public function readAttribute($attribute) {} /** * Writes an attribute value by its name + * * * $robot->writeAttribute("name", "Rosey"); * * - * @param string $attribute - * @param mixed $value + * + * @param string $attribute + * @param mixed $value */ public function writeAttribute($attribute, $value) {} /** * Returns the instance as an array representation * - * @return array + * + * @return array */ public function toArray() {} /** * Serializes the object for json_encode * - * @return array + * + * @return array */ public function jsonSerialize() {} diff --git a/ide/stubs/Phalcon/mvc/model/Transaction.php b/ide/stubs/Phalcon/mvc/model/Transaction.php index cd36c1da2..459a029b9 100644 --- a/ide/stubs/Phalcon/mvc/model/Transaction.php +++ b/ide/stubs/Phalcon/mvc/model/Transaction.php @@ -4,29 +4,41 @@ /** * Phalcon\Mvc\Model\Transaction + * * Transactions are protective blocks where SQL statements are only permanent if they can * all succeed as one atomic action. Phalcon\Transaction is intended to be used with Phalcon_Model_Base. * Phalcon Transactions should be created using Phalcon\Transaction\Manager. + * * * try { - * $manager = new \Phalcon\Mvc\Model\Transaction\Manager(); - * $transaction = $manager->get(); - * $robot = new Robots(); - * $robot->setTransaction($transaction); - * $robot->name = "WALL·E"; - * $robot->created_at = date("Y-m-d"); - * if ($robot->save() === false) { - * $transaction->rollback("Can't save robot"); - * } - * $robotPart = new RobotParts(); - * $robotPart->setTransaction($transaction); - * $robotPart->type = "head"; - * if ($robotPart->save() === false) { - * $transaction->rollback("Can't save robot part"); - * } - * $transaction->commit(); + * $manager = new \Phalcon\Mvc\Model\Transaction\Manager(); + * + * $transaction = $manager->get(); + * + * $robot = new Robots(); + * + * $robot->setTransaction($transaction); + * + * $robot->name = "WALL·E"; + * $robot->created_at = date("Y-m-d"); + * + * if ($robot->save() === false) { + * $transaction->rollback("Can't save robot"); + * } + * + * $robotPart = new RobotParts(); + * + * $robotPart->setTransaction($transaction); + * + * $robotPart->type = "head"; + * + * if ($robotPart->save() === false) { + * $transaction->rollback("Can't save robot part"); + * } + * + * $transaction->commit(); * } catch(Phalcon\Mvc\Model\Transaction\Failed $e) { - * echo "Failed, reason: ", $e->getMessage(); + * echo "Failed, reason: ", $e->getMessage(); * } * */ @@ -57,88 +69,90 @@ class Transaction implements \Phalcon\Mvc\Model\TransactionInterface /** * Phalcon\Mvc\Model\Transaction constructor * - * @param \Phalcon\DiInterface $dependencyInjector - * @param boolean $autoBegin - * @param string $service + * + * @param \Phalcon\DiInterface $dependencyInjector + * @param boolean $autoBegin + * @param string $service */ public function __construct(\Phalcon\DiInterface $dependencyInjector, $autoBegin = false, $service = null) {} /** * Sets transaction manager related to the transaction * - * @param mixed $manager + * @param \Phalcon\Mvc\Model\Transaction\ManagerInterface $manager */ public function setTransactionManager(\Phalcon\Mvc\Model\Transaction\ManagerInterface $manager) {} /** * Starts the transaction * - * @return bool + * @return bool */ public function begin() {} /** * Commits the transaction * - * @return bool + * @return bool */ public function commit() {} /** * Rollbacks the transaction * - * @param string $rollbackMessage - * @param \Phalcon\Mvc\ModelInterface $rollbackRecord - * @return boolean + * + * @param string $rollbackMessage + * @param \Phalcon\Mvc\ModelInterface $rollbackRecord + * @return bool */ public function rollback($rollbackMessage = null, $rollbackRecord = null) {} /** * Returns the connection related to transaction * - * @return \Phalcon\Db\AdapterInterface + * @return \Phalcon\Db\AdapterInterface */ public function getConnection() {} /** * Sets if is a reused transaction or new once * - * @param bool $isNew + * @param bool $isNew */ public function setIsNewTransaction($isNew) {} /** * Sets flag to rollback on abort the HTTP connection * - * @param bool $rollbackOnAbort + * @param bool $rollbackOnAbort */ public function setRollbackOnAbort($rollbackOnAbort) {} /** * Checks whether transaction is managed by a transaction manager * - * @return bool + * @return bool */ public function isManaged() {} /** * Returns validations messages from last save try * - * @return array + * @return array */ public function getMessages() {} /** * Checks whether internal connection is under an active transaction * - * @return bool + * @return bool */ public function isValid() {} /** * Sets object which generates rollback action * - * @param mixed $record + * @param \Phalcon\Mvc\ModelInterface $record */ public function setRollbackedRecord(\Phalcon\Mvc\ModelInterface $record) {} diff --git a/ide/stubs/Phalcon/mvc/model/TransactionInterface.php b/ide/stubs/Phalcon/mvc/model/TransactionInterface.php index 88a500734..10f45c737 100644 --- a/ide/stubs/Phalcon/mvc/model/TransactionInterface.php +++ b/ide/stubs/Phalcon/mvc/model/TransactionInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\TransactionInterface + * * Interface for Phalcon\Mvc\Model\Transaction */ interface TransactionInterface @@ -12,79 +13,88 @@ interface TransactionInterface /** * Sets transaction manager related to the transaction * - * @param mixed $manager + * @param \Phalcon\Mvc\Model\Transaction\ManagerInterface $manager */ public function setTransactionManager(\Phalcon\Mvc\Model\Transaction\ManagerInterface $manager); /** * Starts the transaction * - * @return boolean + * + * @return boolean */ public function begin(); /** * Commits the transaction * - * @return boolean + * + * @return boolean */ public function commit(); /** * Rollbacks the transaction * - * @param string $rollbackMessage - * @param \Phalcon\Mvc\ModelInterface $rollbackRecord - * @return boolean + * + * @param string $rollbackMessage + * @param \Phalcon\Mvc\ModelInterface $rollbackRecord + * @return boolean */ public function rollback($rollbackMessage = null, $rollbackRecord = null); /** * Returns connection related to transaction * - * @return string + * + * @return string */ public function getConnection(); /** * Sets if is a reused transaction or new once * - * @param boolean $isNew + * + * @param boolean $isNew */ public function setIsNewTransaction($isNew); /** * Sets flag to rollback on abort the HTTP connection * - * @param boolean $rollbackOnAbort + * + * @param boolean $rollbackOnAbort */ public function setRollbackOnAbort($rollbackOnAbort); /** * Checks whether transaction is managed by a transaction manager * - * @return boolean + * + * @return boolean */ public function isManaged(); /** * Returns validations messages from last save try * - * @return array + * + * @return array */ public function getMessages(); /** * Checks whether internal connection is under an active transaction * - * @return boolean + * + * @return boolean */ public function isValid(); /** * Sets object which generates rollback action * - * @param mixed $record + * @param \Phalcon\Mvc\ModelInterface $record */ public function setRollbackedRecord(\Phalcon\Mvc\ModelInterface $record); diff --git a/ide/stubs/Phalcon/mvc/model/ValidationFailed.php b/ide/stubs/Phalcon/mvc/model/ValidationFailed.php index aa76ae92c..c27de0c99 100644 --- a/ide/stubs/Phalcon/mvc/model/ValidationFailed.php +++ b/ide/stubs/Phalcon/mvc/model/ValidationFailed.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\ValidationFailed + * * This exception is generated when a model fails to save a record * Phalcon\Mvc\Model must be set up to have this behavior */ @@ -19,22 +20,23 @@ class ValidationFailed extends \Phalcon\Mvc\Model\Exception /** * Phalcon\Mvc\Model\ValidationFailed constructor * - * @param Model $model - * @param Message[] $validationMessages + * + * @param Model $model + * @param Message[] $validationMessages */ public function __construct(\Phalcon\Mvc\Model $model, array $validationMessages) {} /** * Returns the model that generated the messages * - * @return \Phalcon\Mvc\Model + * @return \Phalcon\Mvc\Model */ public function getModel() {} /** * Returns the complete group of messages produced in the validation * - * @return Message[] + * @return Message[] */ public function getMessages() {} diff --git a/ide/stubs/Phalcon/mvc/model/Validator.php b/ide/stubs/Phalcon/mvc/model/Validator.php index d39971cc4..1dbb47bcf 100644 --- a/ide/stubs/Phalcon/mvc/model/Validator.php +++ b/ide/stubs/Phalcon/mvc/model/Validator.php @@ -4,7 +4,9 @@ /** * Phalcon\Mvc\Model\Validator + * * This is a base class for Phalcon\Mvc\Model validators + * * This class is only for use with Phalcon\Mvc\Collection. If you are using * Phalcon\Mvc\Model, please use the validators provided by Phalcon\Validation. */ @@ -20,47 +22,49 @@ abstract class Validator implements \Phalcon\Mvc\Model\ValidatorInterface /** * Phalcon\Mvc\Model\Validator constructor * - * @param array $options + * @param array $options */ public function __construct(array $options) {} /** * Appends a message to the validator * - * @param string $message - * @param string|array $field - * @param string $type + * + * @param string $message + * @param string|array $field + * @param string $type */ protected function appendMessage($message, $field = null, $type = null) {} /** * Returns messages generated by the validator * - * @return array + * @return array */ public function getMessages() {} /** * Returns all the options from the validator * - * @return array + * + * @return array */ public function getOptions() {} /** * Returns an option * - * @param string $option - * @param mixed $defaultValue - * @return mixed + * @param string $option + * @param mixed $defaultValue + * @return mixed */ public function getOption($option, $defaultValue = "") {} /** * Check whether an option has been defined in the validator options * - * @param string $option - * @return bool + * @param string $option + * @return bool */ public function isSetOption($option) {} diff --git a/ide/stubs/Phalcon/mvc/model/ValidatorInterface.php b/ide/stubs/Phalcon/mvc/model/ValidatorInterface.php index bcf36ddcc..4b95f31f3 100644 --- a/ide/stubs/Phalcon/mvc/model/ValidatorInterface.php +++ b/ide/stubs/Phalcon/mvc/model/ValidatorInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\ValidatorInterface + * * Interface for Phalcon\Mvc\Model validators */ interface ValidatorInterface @@ -12,15 +13,17 @@ interface ValidatorInterface /** * Returns messages generated by the validator * - * @return array + * + * @return array */ public function getMessages(); /** * Executes the validator * - * @param \Phalcon\Mvc\ModelInterface $record - * @return boolean + * + * @param \Phalcon\Mvc\ModelInterface $record + * @return bool */ public function validate(\Phalcon\Mvc\EntityInterface $record); diff --git a/ide/stubs/Phalcon/mvc/model/behavior/SoftDelete.php b/ide/stubs/Phalcon/mvc/model/behavior/SoftDelete.php index 58b4576c7..ba3184716 100644 --- a/ide/stubs/Phalcon/mvc/model/behavior/SoftDelete.php +++ b/ide/stubs/Phalcon/mvc/model/behavior/SoftDelete.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\Behavior\SoftDelete + * * Instead of permanently delete a record it marks the record as * deleted changing the value of a flag column */ @@ -13,8 +14,8 @@ class SoftDelete extends \Phalcon\Mvc\Model\Behavior /** * Listens for notifications from the models manager * - * @param string $type - * @param mixed $model + * @param string $type + * @param \Phalcon\Mvc\ModelInterface $model */ public function notify($type, \Phalcon\Mvc\ModelInterface $model) {} diff --git a/ide/stubs/Phalcon/mvc/model/behavior/Timestampable.php b/ide/stubs/Phalcon/mvc/model/behavior/Timestampable.php index f30163c10..d27433f6a 100644 --- a/ide/stubs/Phalcon/mvc/model/behavior/Timestampable.php +++ b/ide/stubs/Phalcon/mvc/model/behavior/Timestampable.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\Behavior\Timestampable + * * Allows to automatically update a model’s attribute saving the * datetime when a record is created or updated */ @@ -13,8 +14,8 @@ class Timestampable extends \Phalcon\Mvc\Model\Behavior /** * Listens for notifications from the models manager * - * @param string $type - * @param mixed $model + * @param string $type + * @param \Phalcon\Mvc\ModelInterface $model */ public function notify($type, \Phalcon\Mvc\ModelInterface $model) {} diff --git a/ide/stubs/Phalcon/mvc/model/metadata/Apc.php b/ide/stubs/Phalcon/mvc/model/metadata/Apc.php index 2850bb3e3..354b49162 100644 --- a/ide/stubs/Phalcon/mvc/model/metadata/Apc.php +++ b/ide/stubs/Phalcon/mvc/model/metadata/Apc.php @@ -4,15 +4,19 @@ /** * Phalcon\Mvc\Model\MetaData\Apc + * * Stores model meta-data in the APC cache. Data will erased if the web server is restarted + * * By default meta-data is stored for 48 hours (172800 seconds) + * * You can query the meta-data by printing apc_fetch('$PMM$') or apc_fetch('$PMM$my-app-id') + * * * $metaData = new \Phalcon\Mvc\Model\Metadata\Apc( - * [ - * "prefix" => "my-app-id", - * "lifetime" => 86400, - * ] + * [ + * "prefix" => "my-app-id", + * "lifetime" => 86400, + * ] * ); * */ @@ -31,23 +35,24 @@ class Apc extends \Phalcon\Mvc\Model\MetaData /** * Phalcon\Mvc\Model\MetaData\Apc constructor * - * @param array $options + * + * @param array $options */ public function __construct($options = null) {} /** * Reads meta-data from APC * - * @param string $key - * @return array|null + * @param string $key + * @return array|null */ public function read($key) {} /** * Writes the meta-data to APC * - * @param string $key - * @param mixed $data + * @param string $key + * @param mixed $data */ public function write($key, $data) {} diff --git a/ide/stubs/Phalcon/mvc/model/metadata/Files.php b/ide/stubs/Phalcon/mvc/model/metadata/Files.php index 7eb230979..4a0205514 100644 --- a/ide/stubs/Phalcon/mvc/model/metadata/Files.php +++ b/ide/stubs/Phalcon/mvc/model/metadata/Files.php @@ -4,12 +4,14 @@ /** * Phalcon\Mvc\Model\MetaData\Files + * * Stores model meta-data in PHP files. + * * * $metaData = new \Phalcon\Mvc\Model\Metadata\Files( - * [ - * "metaDataDir" => "app/cache/metadata/", - * ] + * [ + * "metaDataDir" => "app/cache/metadata/", + * ] * ); * */ @@ -25,23 +27,26 @@ class Files extends \Phalcon\Mvc\Model\MetaData /** * Phalcon\Mvc\Model\MetaData\Files constructor * - * @param array $options + * + * @param array $options */ public function __construct($options = null) {} /** * Reads meta-data from files * - * @param string $key - * @return mixed + * + * @param string $key + * @return mixed */ public function read($key) {} /** * Writes the meta-data to files * - * @param string $key - * @param array $data + * + * @param string $key + * @param array $data */ public function write($key, $data) {} diff --git a/ide/stubs/Phalcon/mvc/model/metadata/Libmemcached.php b/ide/stubs/Phalcon/mvc/model/metadata/Libmemcached.php index cb94c554e..d08f49465 100644 --- a/ide/stubs/Phalcon/mvc/model/metadata/Libmemcached.php +++ b/ide/stubs/Phalcon/mvc/model/metadata/Libmemcached.php @@ -4,25 +4,28 @@ /** * Phalcon\Mvc\Model\MetaData\Libmemcached + * * Stores model meta-data in the Memcache. + * * By default meta-data is stored for 48 hours (172800 seconds) + * * * $metaData = new Phalcon\Mvc\Model\Metadata\Libmemcached( - * [ - * "servers" => [ - * [ - * "host" => "localhost", - * "port" => 11211, - * "weight" => 1, - * ], - * ], - * "client" => [ - * Memcached::OPT_HASH => Memcached::HASH_MD5, - * Memcached::OPT_PREFIX_KEY => "prefix.", - * ], - * "lifetime" => 3600, - * "prefix" => "my_", - * ] + * [ + * "servers" => [ + * [ + * "host" => "localhost", + * "port" => 11211, + * "weight" => 1, + * ], + * ], + * "client" => [ + * Memcached::OPT_HASH => Memcached::HASH_MD5, + * Memcached::OPT_PREFIX_KEY => "prefix.", + * ], + * "lifetime" => 3600, + * "prefix" => "my_", + * ] * ); * */ @@ -41,23 +44,24 @@ class Libmemcached extends \Phalcon\Mvc\Model\MetaData /** * Phalcon\Mvc\Model\MetaData\Libmemcached constructor * - * @param array $options + * + * @param array $options */ public function __construct($options = null) {} /** * Reads metadata from Memcache * - * @param string $key - * @return array|null + * @param string $key + * @return array|null */ public function read($key) {} /** * Writes the metadata to Memcache * - * @param string $key - * @param mixed $data + * @param string $key + * @param mixed $data */ public function write($key, $data) {} diff --git a/ide/stubs/Phalcon/mvc/model/metadata/Memcache.php b/ide/stubs/Phalcon/mvc/model/metadata/Memcache.php index bcb03a5fd..3550bd154 100644 --- a/ide/stubs/Phalcon/mvc/model/metadata/Memcache.php +++ b/ide/stubs/Phalcon/mvc/model/metadata/Memcache.php @@ -4,17 +4,20 @@ /** * Phalcon\Mvc\Model\MetaData\Memcache + * * Stores model meta-data in the Memcache. + * * By default meta-data is stored for 48 hours (172800 seconds) + * * * $metaData = new Phalcon\Mvc\Model\Metadata\Memcache( - * [ - * "prefix" => "my-app-id", - * "lifetime" => 86400, - * "host" => "localhost", - * "port" => 11211, - * "persistent" => false, - * ] + * [ + * "prefix" => "my-app-id", + * "lifetime" => 86400, + * "host" => "localhost", + * "port" => 11211, + * "persistent" => false, + * ] * ); * */ @@ -33,23 +36,24 @@ class Memcache extends \Phalcon\Mvc\Model\MetaData /** * Phalcon\Mvc\Model\MetaData\Memcache constructor * - * @param array $options + * + * @param array $options */ public function __construct($options = null) {} /** * Reads metadata from Memcache * - * @param string $key - * @return array|null + * @param string $key + * @return array|null */ public function read($key) {} /** * Writes the metadata to Memcache * - * @param string $key - * @param mixed $data + * @param string $key + * @param mixed $data */ public function write($key, $data) {} diff --git a/ide/stubs/Phalcon/mvc/model/metadata/Memory.php b/ide/stubs/Phalcon/mvc/model/metadata/Memory.php index 30519a06d..737943829 100644 --- a/ide/stubs/Phalcon/mvc/model/metadata/Memory.php +++ b/ide/stubs/Phalcon/mvc/model/metadata/Memory.php @@ -4,7 +4,9 @@ /** * Phalcon\Mvc\Model\MetaData\Memory + * * Stores model meta-data in memory. Data will be erased when the request finishes + * */ class Memory extends \Phalcon\Mvc\Model\MetaData { @@ -15,23 +17,26 @@ class Memory extends \Phalcon\Mvc\Model\MetaData /** * Phalcon\Mvc\Model\MetaData\Memory constructor * - * @param array $options + * + * @param array $options */ public function __construct($options = null) {} /** * Reads the meta-data from temporal memory * - * @param string $key - * @return array + * + * @param string $key + * @return array */ public function read($key) {} /** * Writes the meta-data to temporal memory * - * @param string $key - * @param array $data + * + * @param string $key + * @param array $data */ public function write($key, $data) {} diff --git a/ide/stubs/Phalcon/mvc/model/metadata/Redis.php b/ide/stubs/Phalcon/mvc/model/metadata/Redis.php index e09ec7168..5bb267b77 100644 --- a/ide/stubs/Phalcon/mvc/model/metadata/Redis.php +++ b/ide/stubs/Phalcon/mvc/model/metadata/Redis.php @@ -4,19 +4,23 @@ /** * Phalcon\Mvc\Model\MetaData\Redis + * * Stores model meta-data in the Redis. + * * By default meta-data is stored for 48 hours (172800 seconds) + * * * use Phalcon\Mvc\Model\Metadata\Redis; + * * $metaData = new Redis( - * [ - * "host" => "127.0.0.1", - * "port" => 6379, - * "persistent" => 0, - * "statsKey" => "_PHCM_MM", - * "lifetime" => 172800, - * "index" => 2, - * ] + * [ + * "host" => "127.0.0.1", + * "port" => 6379, + * "persistent" => 0, + * "statsKey" => "_PHCM_MM", + * "lifetime" => 172800, + * "index" => 2, + * ] * ); * */ @@ -35,23 +39,24 @@ class Redis extends \Phalcon\Mvc\Model\MetaData /** * Phalcon\Mvc\Model\MetaData\Redis constructor * - * @param array $options + * + * @param array $options */ public function __construct($options = null) {} /** * Reads metadata from Redis * - * @param string $key - * @return array|null + * @param string $key + * @return array|null */ public function read($key) {} /** * Writes the metadata to Redis * - * @param string $key - * @param mixed $data + * @param string $key + * @param mixed $data */ public function write($key, $data) {} diff --git a/ide/stubs/Phalcon/mvc/model/metadata/Session.php b/ide/stubs/Phalcon/mvc/model/metadata/Session.php index e3e8ac793..387e27806 100644 --- a/ide/stubs/Phalcon/mvc/model/metadata/Session.php +++ b/ide/stubs/Phalcon/mvc/model/metadata/Session.php @@ -4,14 +4,17 @@ /** * Phalcon\Mvc\Model\MetaData\Session + * * Stores model meta-data in session. Data will erased when the session finishes. * Meta-data are permanent while the session is active. + * * You can query the meta-data by printing $_SESSION['$PMM$'] + * * * $metaData = new \Phalcon\Mvc\Model\Metadata\Session( - * [ - * "prefix" => "my-app-id", - * ] + * [ + * "prefix" => "my-app-id", + * ] * ); * */ @@ -24,23 +27,26 @@ class Session extends \Phalcon\Mvc\Model\MetaData /** * Phalcon\Mvc\Model\MetaData\Session constructor * - * @param array $options + * + * @param array $options */ public function __construct($options = null) {} /** * Reads meta-data from $_SESSION * - * @param string $key - * @return array + * + * @param string $key + * @return array */ public function read($key) {} /** * Writes the meta-data to $_SESSION * - * @param string $key - * @param array $data + * + * @param string $key + * @param array $data */ public function write($key, $data) {} diff --git a/ide/stubs/Phalcon/mvc/model/metadata/StrategyInterface.php b/ide/stubs/Phalcon/mvc/model/metadata/StrategyInterface.php index b7874be24..0089a3e35 100644 --- a/ide/stubs/Phalcon/mvc/model/metadata/StrategyInterface.php +++ b/ide/stubs/Phalcon/mvc/model/metadata/StrategyInterface.php @@ -9,19 +9,21 @@ interface StrategyInterface /** * The meta-data is obtained by reading the column descriptions from the database information schema * - * @param \Phalcon\Mvc\ModelInterface $model - * @param \Phalcon\DiInterface $dependencyInjector - * @return array + * + * @param \Phalcon\Mvc\ModelInterface $model + * @param \Phalcon\DiInterface $dependencyInjector + * @return array */ public function getMetaData(\Phalcon\Mvc\ModelInterface $model, \Phalcon\DiInterface $dependencyInjector); /** * Read the model's column map, this can't be inferred * + * * @todo Not implemented - * @param \Phalcon\Mvc\ModelInterface $model - * @param \Phalcon\DiInterface $dependencyInjector - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @param \Phalcon\DiInterface $dependencyInjector + * @return array */ public function getColumnMaps(\Phalcon\Mvc\ModelInterface $model, \Phalcon\DiInterface $dependencyInjector); diff --git a/ide/stubs/Phalcon/mvc/model/metadata/Xcache.php b/ide/stubs/Phalcon/mvc/model/metadata/Xcache.php index 882fa36ae..05dc549b6 100644 --- a/ide/stubs/Phalcon/mvc/model/metadata/Xcache.php +++ b/ide/stubs/Phalcon/mvc/model/metadata/Xcache.php @@ -4,15 +4,19 @@ /** * Phalcon\Mvc\Model\MetaData\Xcache + * * Stores model meta-data in the XCache cache. Data will erased if the web server is restarted + * * By default meta-data is stored for 48 hours (172800 seconds) + * * You can query the meta-data by printing xcache_get('$PMM$') or xcache_get('$PMM$my-app-id') + * * * $metaData = new Phalcon\Mvc\Model\Metadata\Xcache( - * [ - * "prefix" => "my-app-id", - * "lifetime" => 86400, - * ] + * [ + * "prefix" => "my-app-id", + * "lifetime" => 86400, + * ] * ); * */ @@ -31,23 +35,26 @@ class Xcache extends \Phalcon\Mvc\Model\MetaData /** * Phalcon\Mvc\Model\MetaData\Xcache constructor * - * @param array $options + * + * @param array $options */ public function __construct($options = null) {} /** * Reads metadata from XCache * - * @param string $key - * @return array + * + * @param string $key + * @return array */ public function read($key) {} /** - * Writes the metadata to XCache + * Writes the metadata to XCache + * * - * @param string $key - * @param array $data + * @param string $key + * @param array $data */ public function write($key, $data) {} diff --git a/ide/stubs/Phalcon/mvc/model/metadata/strategy/Annotations.php b/ide/stubs/Phalcon/mvc/model/metadata/strategy/Annotations.php index f1b7b11fa..af7790fa3 100644 --- a/ide/stubs/Phalcon/mvc/model/metadata/strategy/Annotations.php +++ b/ide/stubs/Phalcon/mvc/model/metadata/strategy/Annotations.php @@ -9,18 +9,18 @@ class Annotations implements \Phalcon\Mvc\Model\MetaData\StrategyInterface /** * The meta-data is obtained by reading the column descriptions from the database information schema * - * @param mixed $model - * @param mixed $dependencyInjector - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @param \Phalcon\DiInterface $dependencyInjector + * @return array */ public final function getMetaData(\Phalcon\Mvc\ModelInterface $model, \Phalcon\DiInterface $dependencyInjector) {} /** * Read the model's column map, this can't be inferred * - * @param mixed $model - * @param mixed $dependencyInjector - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @param \Phalcon\DiInterface $dependencyInjector + * @return array */ public final function getColumnMaps(\Phalcon\Mvc\ModelInterface $model, \Phalcon\DiInterface $dependencyInjector) {} diff --git a/ide/stubs/Phalcon/mvc/model/metadata/strategy/Introspection.php b/ide/stubs/Phalcon/mvc/model/metadata/strategy/Introspection.php index 03dd36675..3f61fd1a4 100644 --- a/ide/stubs/Phalcon/mvc/model/metadata/strategy/Introspection.php +++ b/ide/stubs/Phalcon/mvc/model/metadata/strategy/Introspection.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\MetaData\Strategy\Introspection + * * Queries the table meta-data in order to introspect the model's metadata */ class Introspection implements \Phalcon\Mvc\Model\MetaData\StrategyInterface @@ -12,18 +13,18 @@ class Introspection implements \Phalcon\Mvc\Model\MetaData\StrategyInterface /** * The meta-data is obtained by reading the column descriptions from the database information schema * - * @param mixed $model - * @param mixed $dependencyInjector - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @param \Phalcon\DiInterface $dependencyInjector + * @return array */ public final function getMetaData(\Phalcon\Mvc\ModelInterface $model, \Phalcon\DiInterface $dependencyInjector) {} /** * Read the model's column map, this can't be inferred * - * @param mixed $model - * @param mixed $dependencyInjector - * @return array + * @param \Phalcon\Mvc\ModelInterface $model + * @param \Phalcon\DiInterface $dependencyInjector + * @return array */ public final function getColumnMaps(\Phalcon\Mvc\ModelInterface $model, \Phalcon\DiInterface $dependencyInjector) {} diff --git a/ide/stubs/Phalcon/mvc/model/query/Builder.php b/ide/stubs/Phalcon/mvc/model/query/Builder.php index 2cb57efc5..67b122b67 100644 --- a/ide/stubs/Phalcon/mvc/model/query/Builder.php +++ b/ide/stubs/Phalcon/mvc/model/query/Builder.php @@ -4,32 +4,35 @@ /** * Phalcon\Mvc\Model\Query\Builder + * * Helps to create PHQL queries using an OO interface + * * * $params = [ - * "models" => ["Users"], - * "columns" => ["id", "name", "status"], - * "conditions" => [ - * [ - * "created > :min: AND created < :max:", - * [ - * "min" => "2013-01-01", - * "max" => "2014-01-01", - * ], - * [ - * "min" => PDO::PARAM_STR, - * "max" => PDO::PARAM_STR, - * ], - * ], - * ], - * // or "conditions" => "created > '2013-01-01' AND created < '2014-01-01'", - * "group" => ["id", "name"], - * "having" => "name = 'Kamil'", - * "order" => ["name", "id"], - * "limit" => 20, - * "offset" => 20, - * // or "limit" => [20, 20], + * "models" => ["Users"], + * "columns" => ["id", "name", "status"], + * "conditions" => [ + * [ + * "created > :min: AND created < :max:", + * [ + * "min" => "2013-01-01", + * "max" => "2014-01-01", + * ], + * [ + * "min" => PDO::PARAM_STR, + * "max" => PDO::PARAM_STR, + * ], + * ], + * ], + * // or "conditions" => "created > '2013-01-01' AND created < '2014-01-01'", + * "group" => ["id", "name"], + * "having" => "name = 'Kamil'", + * "order" => ["name", "id"], + * "limit" => 20, + * "offset" => 20, + * // or "limit" => [20, 20], * ]; + * * $queryBuilder = new \Phalcon\Mvc\Model\Query\Builder($params); * */ @@ -90,456 +93,512 @@ class Builder implements \Phalcon\Mvc\Model\Query\BuilderInterface, \Phalcon\Di\ /** * Phalcon\Mvc\Model\Query\Builder constructor * - * @param mixed $params - * @param mixed $dependencyInjector + * @param mixed $params + * @param \Phalcon\DiInterface $dependencyInjector */ public function __construct($params = null, \Phalcon\DiInterface $dependencyInjector = null) {} /** * Sets the DependencyInjector container * - * @param mixed $dependencyInjector - * @return Builder + * @param \Phalcon\DiInterface $dependencyInjector + * @return Builder */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the DependencyInjector container * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI() {} /** * Sets SELECT DISTINCT / SELECT ALL flag + * * * $builder->distinct("status"); * $builder->distinct(null); * * - * @param mixed $distinct - * @return Builder + * @param mixed $distinct + * @return Builder */ public function distinct($distinct) {} /** * Returns SELECT DISTINCT / SELECT ALL flag * - * @return bool + * @return bool */ public function getDistinct() {} /** * Sets the columns to be queried + * * * $builder->columns("id, name"); + * * $builder->columns( - * [ - * "id", - * "name", - * ] + * [ + * "id", + * "name", + * ] * ); + * * $builder->columns( - * [ - * "name", - * "number" => "COUNT(*)", - * ] + * [ + * "name", + * "number" => "COUNT()", + * ] * ); * * - * @param mixed $columns - * @return Builder + * @param mixed $columns + * @return Builder */ public function columns($columns) {} /** * Return the columns to be queried * - * @return string|array + * + * @return string|array */ public function getColumns() {} /** * Sets the models who makes part of the query + * * * $builder->from("Robots"); + * * $builder->from( - * [ - * "Robots", - * "RobotsParts", - * ] + * [ + * "Robots", + * "RobotsParts", + * ] * ); + * * $builder->from( - * [ - * "r" => "Robots", - * "rp" => "RobotsParts", - * ] + * [ + * "r" => "Robots", + * "rp" => "RobotsParts", + * ] * ); * * - * @param mixed $models - * @return Builder + * @param mixed $models + * @return Builder */ public function from($models) {} /** * Add a model to take part of the query + * * * // Load data from models Robots * $builder->addFrom("Robots"); + * * // Load data from model 'Robots' using 'r' as alias in PHQL * $builder->addFrom("Robots", "r"); + * * // Load data from model 'Robots' using 'r' as alias in PHQL * // and eager load model 'RobotsParts' * $builder->addFrom("Robots", "r", "RobotsParts"); + * * // Load data from model 'Robots' using 'r' as alias in PHQL * // and eager load models 'RobotsParts' and 'Parts' * $builder->addFrom( - * "Robots", - * "r", - * [ - * "RobotsParts", - * "Parts", - * ] + * "Robots", + * "r", + * [ + * "RobotsParts", + * "Parts", + * ] * ); * * - * @param mixed $model - * @param mixed $alias - * @param mixed $with - * @return Builder + * @param mixed $model + * @param mixed $alias + * @param mixed $with + * @return Builder */ public function addFrom($model, $alias = null, $with = null) {} /** * Return the models who makes part of the query * - * @return string|array + * + * @return string|array */ public function getFrom() {} /** * Adds an INNER join to the query + * * * // Inner Join model 'Robots' with automatic conditions and alias * $builder->join("Robots"); + * * // Inner Join model 'Robots' specifying conditions * $builder->join("Robots", "Robots.id = RobotsParts.robots_id"); + * * // Inner Join model 'Robots' specifying conditions and alias * $builder->join("Robots", "r.id = RobotsParts.robots_id", "r"); + * * // Left Join model 'Robots' specifying conditions, alias and type of join * $builder->join("Robots", "r.id = RobotsParts.robots_id", "r", "LEFT"); * * - * @param string $model - * @param string $conditions - * @param string $alias - * @param string $type - * @return \Phalcon\Mvc\Model\Query\Builder + * + * @param string $model + * @param string $conditions + * @param string $alias + * @param string $type + * @return Builder */ public function join($model, $conditions = null, $alias = null, $type = null) {} /** * Adds an INNER join to the query + * * * // Inner Join model 'Robots' with automatic conditions and alias * $builder->innerJoin("Robots"); + * * // Inner Join model 'Robots' specifying conditions * $builder->innerJoin("Robots", "Robots.id = RobotsParts.robots_id"); + * * // Inner Join model 'Robots' specifying conditions and alias * $builder->innerJoin("Robots", "r.id = RobotsParts.robots_id", "r"); * * - * @param string $model - * @param string $conditions - * @param string $alias - * @param string $type - * @return \Phalcon\Mvc\Model\Query\Builder + * + * @param string $model + * @param string $conditions + * @param string $alias + * @param string $type + * @return Builder */ public function innerJoin($model, $conditions = null, $alias = null) {} /** * Adds a LEFT join to the query + * * * $builder->leftJoin("Robots", "r.id = RobotsParts.robots_id", "r"); * * - * @param string $model - * @param string $conditions - * @param string $alias - * @return \Phalcon\Mvc\Model\Query\Builder + * + * @param string $model + * @param string $conditions + * @param string $alias + * @return Builder */ public function leftJoin($model, $conditions = null, $alias = null) {} /** * Adds a RIGHT join to the query + * * * $builder->rightJoin("Robots", "r.id = RobotsParts.robots_id", "r"); * * - * @param string $model - * @param string $conditions - * @param string $alias - * @return \Phalcon\Mvc\Model\Query\Builder + * + * @param string $model + * @param string $conditions + * @param string $alias + * @return Builder */ public function rightJoin($model, $conditions = null, $alias = null) {} /** * Return join parts of the query * - * @return array + * + * @return array */ public function getJoins() {} /** * Sets the query conditions + * * * $builder->where(100); + * * $builder->where("name = 'Peter'"); + * * $builder->where( - * "name = :name: AND id > :id:", - * [ - * "name" => "Peter", - * "id" => 100, - * ] + * "name = :name: AND id > :id:", + * [ + * "name" => "Peter", + * "id" => 100, + * ] * ); * * - * @param mixed $conditions - * @param array $bindParams - * @param array $bindTypes - * @return \Phalcon\Mvc\Model\Query\Builder + * + * @param mixed $conditions + * @param array $bindParams + * @param array $bindTypes + * @return Builder */ public function where($conditions, $bindParams = null, $bindTypes = null) {} /** * Appends a condition to the current conditions using a AND operator + * * * $builder->andWhere("name = 'Peter'"); + * * $builder->andWhere( - * "name = :name: AND id > :id:", - * [ - * "name" => "Peter", - * "id" => 100, - * ] + * "name = :name: AND id > :id:", + * [ + * "name" => "Peter", + * "id" => 100, + * ] * ); * * - * @param string $conditions - * @param array $bindParams - * @param array $bindTypes - * @return \Phalcon\Mvc\Model\Query\Builder + * + * @param string $conditions + * @param array $bindParams + * @param array $bindTypes + * @return Builder */ public function andWhere($conditions, $bindParams = null, $bindTypes = null) {} /** * Appends a condition to the current conditions using an OR operator + * * * $builder->orWhere("name = 'Peter'"); + * * $builder->orWhere( - * "name = :name: AND id > :id:", - * [ - * "name" => "Peter", - * "id" => 100, - * ] + * "name = :name: AND id > :id:", + * [ + * "name" => "Peter", + * "id" => 100, + * ] * ); * * - * @param string $conditions - * @param array $bindParams - * @param array $bindTypes - * @return \Phalcon\Mvc\Model\Query\Builder + * + * @param string $conditions + * @param array $bindParams + * @param array $bindTypes + * @return Builder */ public function orWhere($conditions, $bindParams = null, $bindTypes = null) {} /** * Appends a BETWEEN condition to the current conditions + * * * $builder->betweenWhere("price", 100.25, 200.50); * * - * @param string $expr - * @param mixed $minimum - * @param mixed $maximum - * @param string $operator - * @return Builder + * @param string $expr + * @param mixed $minimum + * @param mixed $maximum + * @param string $operator + * @return Builder */ public function betweenWhere($expr, $minimum, $maximum, $operator = BuilderInterface::OPERATOR_AND) {} /** * Appends a NOT BETWEEN condition to the current conditions + * * * $builder->notBetweenWhere("price", 100.25, 200.50); * * - * @param string $expr - * @param mixed $minimum - * @param mixed $maximum - * @param string $operator - * @return Builder + * @param string $expr + * @param mixed $minimum + * @param mixed $maximum + * @param string $operator + * @return Builder */ public function notBetweenWhere($expr, $minimum, $maximum, $operator = BuilderInterface::OPERATOR_AND) {} /** * Appends an IN condition to the current conditions + * * * $builder->inWhere("id", [1, 2, 3]); * * - * @param string $expr - * @param array $values - * @param string $operator - * @return Builder + * @param string $expr + * @param array $values + * @param string $operator + * @return Builder */ public function inWhere($expr, array $values, $operator = BuilderInterface::OPERATOR_AND) {} /** * Appends a NOT IN condition to the current conditions + * * * $builder->notInWhere("id", [1, 2, 3]); * * - * @param string $expr - * @param array $values - * @param string $operator - * @return Builder + * @param string $expr + * @param array $values + * @param string $operator + * @return Builder */ public function notInWhere($expr, array $values, $operator = BuilderInterface::OPERATOR_AND) {} /** * Return the conditions for the query * - * @return string|array + * + * @return string|array */ public function getWhere() {} /** * Sets an ORDER BY condition clause + * * * $builder->orderBy("Robots.name"); * $builder->orderBy(["1", "Robots.name"]); * * - * @param string|array $orderBy - * @return \Phalcon\Mvc\Model\Query\Builder + * + * @param string|array $orderBy + * @return Builder */ public function orderBy($orderBy) {} /** * Returns the set ORDER BY clause * - * @return string|array + * + * @return string|array */ public function getOrderBy() {} /** * Sets a HAVING condition clause. You need to escape PHQL reserved words using [ and ] delimiters + * * * $builder->having("SUM(Robots.price) > 0"); * * - * @param string $having - * @return Builder + * @param string $having + * @return Builder */ public function having($having) {} /** * Sets a FOR UPDATE clause + * * * $builder->forUpdate(true); * * - * @param bool $forUpdate - * @return Builder + * @param bool $forUpdate + * @return Builder */ public function forUpdate($forUpdate) {} /** * Return the current having clause * - * @return string|array + * + * @return string|array */ public function getHaving() {} /** * Sets a LIMIT clause, optionally an offset clause + * * * $builder->limit(100); * $builder->limit(100, 20); * * - * @param mixed $limit - * @param mixed $offset - * @return Builder + * @param mixed $limit + * @param mixed $offset + * @return Builder */ public function limit($limit = null, $offset = null) {} /** * Returns the current LIMIT clause * - * @return string|array + * + * @return string|array */ public function getLimit() {} /** * Sets an OFFSET clause + * * * $builder->offset(30); * * - * @param int $offset - * @return Builder + * @param int $offset + * @return Builder */ public function offset($offset) {} /** * Returns the current OFFSET clause * - * @return string|array + * + * @return string|array */ public function getOffset() {} /** * Sets a GROUP BY clause + * * * $builder->groupBy( - * [ - * "Robots.name", - * ] + * [ + * "Robots.name", + * ] * ); * * - * @param string|array $group - * @return \Phalcon\Mvc\Model\Query\Builder + * + * @param string|array $group + * @return Builder */ public function groupBy($group) {} /** * Returns the GROUP BY clause * - * @return string + * + * @return string */ public function getGroupBy() {} /** * Returns a PHQL statement built based on the builder parameters * - * @return string + * + * @return string */ public final function getPhql() {} /** * Returns the query built * - * @return \Phalcon\Mvc\Model\QueryInterface + * @return \Phalcon\Mvc\Model\QueryInterface */ public function getQuery() {} /** * Automatically escapes identifiers but only if they need to be escaped. * - * @param string $identifier - * @return string + * @param string $identifier + * @return string */ final public function autoescape($identifier) {} diff --git a/ide/stubs/Phalcon/mvc/model/query/BuilderInterface.php b/ide/stubs/Phalcon/mvc/model/query/BuilderInterface.php index 0a6eaf772..25e09563b 100644 --- a/ide/stubs/Phalcon/mvc/model/query/BuilderInterface.php +++ b/ide/stubs/Phalcon/mvc/model/query/BuilderInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\Query\BuilderInterface + * * Interface for Phalcon\Mvc\Model\Query\Builder */ interface BuilderInterface @@ -18,241 +19,267 @@ interface BuilderInterface /** * Sets the columns to be queried * - * @param string|array $columns - * @return \Phalcon\Mvc\Model\Query\BuilderInterface + * + * @param string|array $columns + * @return \Phalcon\Mvc\Model\Query\BuilderInterface */ public function columns($columns); /** * Return the columns to be queried * - * @return string|array + * + * @return string|array */ public function getColumns(); /** * Sets the models who makes part of the query * - * @param string|array $models - * @return \Phalcon\Mvc\Model\Query\BuilderInterface + * + * @param string|array $models + * @return \Phalcon\Mvc\Model\Query\BuilderInterface */ public function from($models); /** * Add a model to take part of the query * - * @param string $model - * @param string $alias - * @return \Phalcon\Mvc\Model\Query\BuilderInterface + * + * @param string $model + * @param string $alias + * @return \Phalcon\Mvc\Model\Query\BuilderInterface */ public function addFrom($model, $alias = null); /** * Return the models who makes part of the query * - * @return string|array + * + * @return string|array */ public function getFrom(); /** * Adds an INNER join to the query * - * @param string $model - * @param string $conditions - * @param string $alias - * @return \Phalcon\Mvc\Model\Query\BuilderInterface + * + * @param string $model + * @param string $conditions + * @param string $alias + * @return \Phalcon\Mvc\Model\Query\BuilderInterface */ public function join($model, $conditions = null, $alias = null); /** * Adds an INNER join to the query * - * @param string $model - * @param string $conditions - * @param string $alias - * @param string $type - * @return \Phalcon\Mvc\Model\Query\Builder + * + * @param string $model + * @param string $conditions + * @param string $alias + * @param string $type + * @return \Phalcon\Mvc\Model\Query\Builder */ public function innerJoin($model, $conditions = null, $alias = null); /** * Adds a LEFT join to the query * - * @param string $model - * @param string $conditions - * @param string $alias - * @return \Phalcon\Mvc\Model\Query\Builder + * + * @param string $model + * @param string $conditions + * @param string $alias + * @return \Phalcon\Mvc\Model\Query\Builder */ public function leftJoin($model, $conditions = null, $alias = null); /** * Adds a RIGHT join to the query * - * @param string $model - * @param string $conditions - * @param string $alias - * @return \Phalcon\Mvc\Model\Query\Builder + * + * @param string $model + * @param string $conditions + * @param string $alias + * @return \Phalcon\Mvc\Model\Query\Builder */ public function rightJoin($model, $conditions = null, $alias = null); /** * Return join parts of the query * - * @return array + * + * @return array */ public function getJoins(); /** * Sets conditions for the query * - * @param string $conditions - * @param array $bindParams - * @param array $bindTypes - * @return \Phalcon\Mvc\Model\Query\BuilderInterface + * + * @param string $conditions + * @param array $bindParams + * @param array $bindTypes + * @return \Phalcon\Mvc\Model\Query\BuilderInterface */ public function where($conditions, $bindParams = null, $bindTypes = null); /** * Appends a condition to the current conditions using a AND operator * - * @param string $conditions - * @param array $bindParams - * @param array $bindTypes - * @return \Phalcon\Mvc\Model\Query\Builder + * + * @param string $conditions + * @param array $bindParams + * @param array $bindTypes + * @return \Phalcon\Mvc\Model\Query\Builder */ public function andWhere($conditions, $bindParams = null, $bindTypes = null); /** * Appends a condition to the current conditions using an OR operator * - * @param string $conditions - * @param array $bindParams - * @param array $bindTypes - * @return \Phalcon\Mvc\Model\Query\Builder + * + * @param string $conditions + * @param array $bindParams + * @param array $bindTypes + * @return \Phalcon\Mvc\Model\Query\Builder */ public function orWhere($conditions, $bindParams = null, $bindTypes = null); /** * Appends a BETWEEN condition to the current conditions * - * @param string $expr - * @param mixed $minimum - * @param mixed $maximum - * @param string $operator - * @return \Phalcon\Mvc\Model\Query\Builder + * + * @param string $expr + * @param mixed $minimum + * @param mixed $maximum + * @param string $operator + * @return \Phalcon\Mvc\Model\Query\Builder */ public function betweenWhere($expr, $minimum, $maximum, $operator = BuilderInterface::OPERATOR_AND); /** * Appends a NOT BETWEEN condition to the current conditions * - * @param string $expr - * @param mixed $minimum - * @param mixed $maximum - * @param string $operator - * @return \Phalcon\Mvc\Model\Query\Builder + * + * @param string $expr + * @param mixed $minimum + * @param mixed $maximum + * @param string $operator + * @return \Phalcon\Mvc\Model\Query\Builder */ public function notBetweenWhere($expr, $minimum, $maximum, $operator = BuilderInterface::OPERATOR_AND); /** * Appends an IN condition to the current conditions * - * @param string $expr - * @param array $values - * @param string $operator - * @return BuilderInterface + * @param string $expr + * @param array $values + * @param string $operator + * @return BuilderInterface */ public function inWhere($expr, array $values, $operator = BuilderInterface::OPERATOR_AND); /** * Appends a NOT IN condition to the current conditions * - * @param string $expr - * @param array $values - * @param string $operator - * @return BuilderInterface + * @param string $expr + * @param array $values + * @param string $operator + * @return BuilderInterface */ public function notInWhere($expr, array $values, $operator = BuilderInterface::OPERATOR_AND); /** * Return the conditions for the query * - * @return string|array + * + * @return string|array */ public function getWhere(); /** * Sets an ORDER BY condition clause * - * @param string $orderBy - * @return \Phalcon\Mvc\Model\Query\BuilderInterface + * + * @param string $orderBy + * @return \Phalcon\Mvc\Model\Query\BuilderInterface */ public function orderBy($orderBy); /** * Return the set ORDER BY clause * - * @return string|array + * + * @return string|array */ public function getOrderBy(); /** * Sets a HAVING condition clause * - * @param string $having - * @return \Phalcon\Mvc\Model\Query\BuilderInterface + * + * @param string $having + * @return \Phalcon\Mvc\Model\Query\BuilderInterface */ public function having($having); /** * Returns the HAVING condition clause * - * @return string|array + * + * @return string|array */ public function getHaving(); /** * Sets a LIMIT clause * - * @param int $limit - * @param int $offset - * @return \Phalcon\Mvc\Model\Query\BuilderInterface + * + * @param int $limit + * @param int $offset + * @return \Phalcon\Mvc\Model\Query\BuilderInterface */ public function limit($limit, $offset = null); /** * Returns the current LIMIT clause * - * @return string|array + * + * @return string|array */ public function getLimit(); /** * Sets a LIMIT clause * - * @param string $group - * @return \Phalcon\Mvc\Model\Query\BuilderInterface + * + * @param string $group + * @return \Phalcon\Mvc\Model\Query\BuilderInterface */ public function groupBy($group); /** * Returns the GROUP BY clause * - * @return string + * + * @return string */ public function getGroupBy(); /** * Returns a PHQL statement built based on the builder parameters * - * @return string + * + * @return string */ public function getPhql(); /** * Returns the query built * - * @return \Phalcon\Mvc\Model\QueryInterface + * + * @return \Phalcon\Mvc\Model\QueryInterface */ public function getQuery(); diff --git a/ide/stubs/Phalcon/mvc/model/query/Lang.php b/ide/stubs/Phalcon/mvc/model/query/Lang.php index b307292dc..aa136930d 100644 --- a/ide/stubs/Phalcon/mvc/model/query/Lang.php +++ b/ide/stubs/Phalcon/mvc/model/query/Lang.php @@ -4,16 +4,19 @@ /** * Phalcon\Mvc\Model\Query\Lang + * * PHQL is implemented as a parser (written in C) that translates syntax in * that of the target RDBMS. It allows Phalcon to offer a unified SQL language to * the developer, while internally doing all the work of translating PHQL * instructions to the most optimal SQL instructions depending on the * RDBMS type associated with a model. + * * To achieve the highest performance possible, we wrote a parser that uses * the same technology as SQLite. This technology provides a small in-memory * parser with a very low memory footprint that is also thread-safe. + * * - * $intermediate = Phalcon\Mvc\Model\Query\Lang::parsePHQL("SELECT r.* FROM Robots r LIMIT 10"); + * $intermediate = Phalcon\Mvc\Model\Query\Lang::parsePHQL("SELECT r. FROM Robots r LIMIT 10"); * */ abstract class Lang @@ -22,8 +25,9 @@ abstract class Lang /** * Parses a PHQL statement returning an intermediate representation (IR) * - * @param string $phql - * @return string + * + * @param string $phql + * @return string */ public static function parsePHQL($phql) {} diff --git a/ide/stubs/Phalcon/mvc/model/query/Status.php b/ide/stubs/Phalcon/mvc/model/query/Status.php index e943e5de2..ba75ee6de 100644 --- a/ide/stubs/Phalcon/mvc/model/query/Status.php +++ b/ide/stubs/Phalcon/mvc/model/query/Status.php @@ -4,24 +4,28 @@ /** * Phalcon\Mvc\Model\Query\Status + * * This class represents the status returned by a PHQL * statement like INSERT, UPDATE or DELETE. It offers context * information and the related messages produced by the * model which finally executes the operations when it fails + * * * $phql = "UPDATE Robots SET name = :name:, type = :type:, year = :year: WHERE id = :id:"; + * * $status = $app->modelsManager->executeQuery( - * $phql, - * [ - * "id" => 100, - * "name" => "Astroy Boy", - * "type" => "mechanical", - * "year" => 1959, - * ] + * $phql, + * [ + * "id" => 100, + * "name" => "Astroy Boy", + * "type" => "mechanical", + * "year" => 1959, + * ] * ); + * * // Check if the update was successful * if ($status->success() === true) { - * echo "OK"; + * echo "OK"; * } * */ @@ -37,29 +41,29 @@ class Status implements \Phalcon\Mvc\Model\Query\StatusInterface /** * Phalcon\Mvc\Model\Query\Status * - * @param bool $success - * @param mixed $model + * @param bool $success + * @param \Phalcon\Mvc\ModelInterface $model */ public function __construct($success, \Phalcon\Mvc\ModelInterface $model = null) {} /** * Returns the model that executed the action * - * @return \Phalcon\Mvc\ModelInterface + * @return \Phalcon\Mvc\ModelInterface */ public function getModel() {} /** * Returns the messages produced because of a failed operation * - * @return \Phalcon\Mvc\Model\MessageInterface[] + * @return \Phalcon\Mvc\Model\MessageInterface[] */ public function getMessages() {} /** * Allows to check if the executed operation was successful * - * @return bool + * @return bool */ public function success() {} diff --git a/ide/stubs/Phalcon/mvc/model/query/StatusInterface.php b/ide/stubs/Phalcon/mvc/model/query/StatusInterface.php index d2741b76b..b2980bec4 100644 --- a/ide/stubs/Phalcon/mvc/model/query/StatusInterface.php +++ b/ide/stubs/Phalcon/mvc/model/query/StatusInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\Query\StatusInterface + * * Interface for Phalcon\Mvc\Model\Query\Status */ interface StatusInterface @@ -12,21 +13,21 @@ interface StatusInterface /** * Returns the model which executed the action * - * @return \Phalcon\Mvc\ModelInterface + * @return \Phalcon\Mvc\ModelInterface */ public function getModel(); /** * Returns the messages produced by an operation failed * - * @return MessageInterface[] + * @return \Phalcon\Mvc\Model\MessageInterface[] */ public function getMessages(); /** * Allows to check if the executed operation was successful * - * @return bool + * @return bool */ public function success(); diff --git a/ide/stubs/Phalcon/mvc/model/resultset/Complex.php b/ide/stubs/Phalcon/mvc/model/resultset/Complex.php index 72e3b74a3..4e756103a 100644 --- a/ide/stubs/Phalcon/mvc/model/resultset/Complex.php +++ b/ide/stubs/Phalcon/mvc/model/resultset/Complex.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\Resultset\Complex + * * Complex resultsets may include complete objects and scalar values. * This class builds every complex row as it is required */ @@ -21,16 +22,17 @@ class Complex extends \Phalcon\Mvc\Model\Resultset implements \Phalcon\Mvc\Model /** * Phalcon\Mvc\Model\Resultset\Complex constructor * - * @param array $columnTypes - * @param \Phalcon\Db\ResultInterface $result - * @param \Phalcon\Cache\BackendInterface $cache + * + * @param array $columnTypes + * @param \Phalcon\Db\ResultInterface $result + * @param \Phalcon\Cache\BackendInterface $cache */ public function __construct($columnTypes, \Phalcon\Db\ResultInterface $result = null, \Phalcon\Cache\BackendInterface $cache = null) {} /** * Returns current row in the resultset * - * @return bool|ModelInterface + * @return bool|ModelInterface */ public final function current() {} @@ -38,21 +40,21 @@ public final function current() {} * Returns a complete resultset as an array, if the resultset has a big number of rows * it could consume more memory than currently it does. * - * @return array + * @return array */ public function toArray() {} /** * Serializing a resultset will dump all related rows into a big array * - * @return string + * @return string */ public function serialize() {} /** * Unserializing a resultset will allow to only works on the rows present in the saved state * - * @param string $data + * @param string $data */ public function unserialize($data) {} diff --git a/ide/stubs/Phalcon/mvc/model/resultset/Simple.php b/ide/stubs/Phalcon/mvc/model/resultset/Simple.php index b11f53d89..781b72a74 100644 --- a/ide/stubs/Phalcon/mvc/model/resultset/Simple.php +++ b/ide/stubs/Phalcon/mvc/model/resultset/Simple.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\Resultset\Simple + * * Simple resultsets only contains a complete objects * This class builds every complete object as it is required */ @@ -22,18 +23,19 @@ class Simple extends \Phalcon\Mvc\Model\Resultset /** * Phalcon\Mvc\Model\Resultset\Simple constructor * - * @param array $columnMap - * @param \Phalcon\Mvc\ModelInterface|Phalcon\Mvc\Model\Row $model - * @param \Phalcon\Db\Result\Pdo|null $result - * @param \Phalcon\Cache\BackendInterface $cache - * @param boolean $keepSnapshots + * + * @param array $columnMap + * @param \Phalcon\Mvc\ModelInterface|Phalcon\Mvc\Model\Row $model + * @param \Phalcon\Db\Result\Pdo|null $result + * @param \Phalcon\Cache\BackendInterface $cache + * @param boolean $keepSnapshots */ public function __construct($columnMap, $model, $result, \Phalcon\Cache\BackendInterface $cache = null, $keepSnapshots = null) {} /** * Returns current row in the resultset * - * @return bool|ModelInterface + * @return bool|ModelInterface */ public final function current() {} @@ -42,22 +44,22 @@ public final function current() {} * it could consume more memory than currently it does. Export the resultset to an array * couldn't be faster with a large number of records * - * @param bool $renameColumns - * @return array + * @param bool $renameColumns + * @return array */ public function toArray($renameColumns = true) {} /** * Serializing a resultset will dump all related rows into a big array * - * @return string + * @return string */ public function serialize() {} /** * Unserializing a resultset will allow to only works on the rows present in the saved state * - * @param string $data + * @param string $data */ public function unserialize($data) {} diff --git a/ide/stubs/Phalcon/mvc/model/transaction/Exception.php b/ide/stubs/Phalcon/mvc/model/transaction/Exception.php index 80333e0d8..51ec8b7d2 100644 --- a/ide/stubs/Phalcon/mvc/model/transaction/Exception.php +++ b/ide/stubs/Phalcon/mvc/model/transaction/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\Transaction\Exception + * * Exceptions thrown in Phalcon\Mvc\Model\Transaction will use this class */ class Exception extends \Phalcon\Mvc\Model\Exception diff --git a/ide/stubs/Phalcon/mvc/model/transaction/Failed.php b/ide/stubs/Phalcon/mvc/model/transaction/Failed.php index 1beee337d..725b413ec 100644 --- a/ide/stubs/Phalcon/mvc/model/transaction/Failed.php +++ b/ide/stubs/Phalcon/mvc/model/transaction/Failed.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\Transaction\Failed + * * This class will be thrown to exit a try/catch block for isolated transactions */ class Failed extends \Phalcon\Mvc\Model\Transaction\Exception @@ -15,22 +16,22 @@ class Failed extends \Phalcon\Mvc\Model\Transaction\Exception /** * Phalcon\Mvc\Model\Transaction\Failed constructor * - * @param string $message - * @param mixed $record + * @param string $message + * @param \Phalcon\Mvc\ModelInterface $record */ public function __construct($message, \Phalcon\Mvc\ModelInterface $record = null) {} /** * Returns validation record messages which stop the transaction * - * @return MessageInterface[] + * @return \Phalcon\Mvc\Model\MessageInterface[] */ public function getRecordMessages() {} /** * Returns validation record messages which stop the transaction * - * @return \Phalcon\Mvc\ModelInterface + * @return \Phalcon\Mvc\ModelInterface */ public function getRecord() {} diff --git a/ide/stubs/Phalcon/mvc/model/transaction/Manager.php b/ide/stubs/Phalcon/mvc/model/transaction/Manager.php index 83277e130..c3ee01681 100644 --- a/ide/stubs/Phalcon/mvc/model/transaction/Manager.php +++ b/ide/stubs/Phalcon/mvc/model/transaction/Manager.php @@ -4,32 +4,46 @@ /** * Phalcon\Mvc\Model\Transaction\Manager + * * A transaction acts on a single database connection. If you have multiple class-specific * databases, the transaction will not protect interaction among them. + * * This class manages the objects that compose a transaction. * A transaction produces a unique connection that is passed to every * object part of the transaction. + * * * try { - * use Phalcon\Mvc\Model\Transaction\Manager as TransactionManager; - * $transactionManager = new TransactionManager(); - * $transaction = $transactionManager->get(); - * $robot = new Robots(); - * $robot->setTransaction($transaction); - * $robot->name = "WALL·E"; - * $robot->created_at = date("Y-m-d"); - * if ($robot->save() === false){ - * $transaction->rollback("Can't save robot"); - * } - * $robotPart = new RobotParts(); - * $robotPart->setTransaction($transaction); - * $robotPart->type = "head"; - * if ($robotPart->save() === false) { - * $transaction->rollback("Can't save robot part"); - * } - * $transaction->commit(); + * use Phalcon\Mvc\Model\Transaction\Manager as TransactionManager; + * + * $transactionManager = new TransactionManager(); + * + * $transaction = $transactionManager->get(); + * + * $robot = new Robots(); + * + * $robot->setTransaction($transaction); + * + * $robot->name = "WALL·E"; + * $robot->created_at = date("Y-m-d"); + * + * if ($robot->save() === false){ + * $transaction->rollback("Can't save robot"); + * } + * + * $robotPart = new RobotParts(); + * + * $robotPart->setTransaction($transaction); + * + * $robotPart->type = "head"; + * + * if ($robotPart->save() === false) { + * $transaction->rollback("Can't save robot part"); + * } + * + * $transaction->commit(); * } catch (Phalcon\Mvc\Model\Transaction\Failed $e) { - * echo "Failed, reason: ", $e->getMessage(); + * echo "Failed, reason: ", $e->getMessage(); * } * */ @@ -57,58 +71,59 @@ class Manager implements \Phalcon\Mvc\Model\Transaction\ManagerInterface, \Phalc /** * Phalcon\Mvc\Model\Transaction\Manager constructor * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function __construct(\Phalcon\DiInterface $dependencyInjector = null) {} /** * Sets the dependency injection container * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the dependency injection container * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI() {} /** * Sets the database service used to run the isolated transactions * - * @param string $service - * @return Manager + * @param string $service + * @return Manager */ public function setDbService($service) {} /** * Returns the database service used to isolate the transaction * - * @return string + * + * @return string */ public function getDbService() {} /** * Set if the transaction manager must register a shutdown function to clean up pendent transactions * - * @param bool $rollbackPendent - * @return Manager + * @param bool $rollbackPendent + * @return Manager */ public function setRollbackPendent($rollbackPendent) {} /** * Check if the transaction manager is registering a shutdown function to clean up pendent transactions * - * @return bool + * @return bool */ public function getRollbackPendent() {} /** * Checks whether the manager has an active transaction * - * @return bool + * @return bool */ public function has() {} @@ -116,16 +131,16 @@ public function has() {} * Returns a new \Phalcon\Mvc\Model\Transaction or an already created once * This method registers a shutdown function to rollback active connections * - * @param bool $autoBegin - * @return \Phalcon\Mvc\Model\TransactionInterface + * @param bool $autoBegin + * @return \Phalcon\Mvc\Model\TransactionInterface */ public function get($autoBegin = true) {} /** * Create/Returns a new transaction or an existing one * - * @param bool $autoBegin - * @return \Phalcon\Mvc\Model\TransactionInterface + * @param bool $autoBegin + * @return \Phalcon\Mvc\Model\TransactionInterface */ public function getOrCreateTransaction($autoBegin = true) {} @@ -143,28 +158,29 @@ public function commit() {} * Rollbacks active transactions within the manager * Collect will remove the transaction from the manager * - * @param boolean $collect + * + * @param boolean $collect */ public function rollback($collect = true) {} /** * Notifies the manager about a rollbacked transaction * - * @param mixed $transaction + * @param \Phalcon\Mvc\Model\TransactionInterface $transaction */ public function notifyRollback(\Phalcon\Mvc\Model\TransactionInterface $transaction) {} /** * Notifies the manager about a committed transaction * - * @param mixed $transaction + * @param \Phalcon\Mvc\Model\TransactionInterface $transaction */ public function notifyCommit(\Phalcon\Mvc\Model\TransactionInterface $transaction) {} /** * Removes transactions from the TransactionManager * - * @param mixed $transaction + * @param \Phalcon\Mvc\Model\TransactionInterface $transaction */ protected function _collectTransaction(\Phalcon\Mvc\Model\TransactionInterface $transaction) {} diff --git a/ide/stubs/Phalcon/mvc/model/transaction/ManagerInterface.php b/ide/stubs/Phalcon/mvc/model/transaction/ManagerInterface.php index e9b6e2eae..640a3f0bb 100644 --- a/ide/stubs/Phalcon/mvc/model/transaction/ManagerInterface.php +++ b/ide/stubs/Phalcon/mvc/model/transaction/ManagerInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Model\Transaction\ManagerInterface + * * Interface for Phalcon\Mvc\Model\Transaction\Manager */ interface ManagerInterface @@ -12,15 +13,15 @@ interface ManagerInterface /** * Checks whether manager has an active transaction * - * @return bool + * @return bool */ public function has(); /** * Returns a new \Phalcon\Mvc\Model\Transaction or an already created once * - * @param bool $autoBegin - * @return \Phalcon\Mvc\Model\TransactionInterface + * @param bool $autoBegin + * @return \Phalcon\Mvc\Model\TransactionInterface */ public function get($autoBegin = true); @@ -38,21 +39,22 @@ public function commit(); * Rollbacks active transactions within the manager * Collect will remove transaction from the manager * - * @param boolean $collect + * + * @param boolean $collect */ public function rollback($collect = false); /** * Notifies the manager about a rollbacked transaction * - * @param mixed $transaction + * @param \Phalcon\Mvc\Model\TransactionInterface $transaction */ public function notifyRollback(\Phalcon\Mvc\Model\TransactionInterface $transaction); /** * Notifies the manager about a committed transaction * - * @param mixed $transaction + * @param \Phalcon\Mvc\Model\TransactionInterface $transaction */ public function notifyCommit(\Phalcon\Mvc\Model\TransactionInterface $transaction); diff --git a/ide/stubs/Phalcon/mvc/model/validator/Email.php b/ide/stubs/Phalcon/mvc/model/validator/Email.php index b3f8dc469..85416bfbb 100644 --- a/ide/stubs/Phalcon/mvc/model/validator/Email.php +++ b/ide/stubs/Phalcon/mvc/model/validator/Email.php @@ -4,26 +4,31 @@ /** * Phalcon\Mvc\Model\Validator\Email + * * Allows to validate if email fields has correct values + * * This validator is only for use with Phalcon\Mvc\Collection. If you are using * Phalcon\Mvc\Model, please use the validators provided by Phalcon\Validation. + * * * use Phalcon\Mvc\Model\Validator\Email as EmailValidator; + * * class Subscriptors extends \Phalcon\Mvc\Collection * { - * public function validation() - * { - * $this->validate( - * new EmailValidator( - * [ - * "field" => "electronic_mail", - * ] - * ) - * ); - * if ($this->validationHasFailed() === true) { - * return false; - * } - * } + * public function validation() + * { + * $this->validate( + * new EmailValidator( + * [ + * "field" => "electronic_mail", + * ] + * ) + * ); + * + * if ($this->validationHasFailed() === true) { + * return false; + * } + * } * } * */ @@ -33,8 +38,8 @@ class Email extends \Phalcon\Mvc\Model\Validator /** * Executes the validator * - * @param mixed $record - * @return bool + * @param \Phalcon\Mvc\EntityInterface $record + * @return bool */ public function validate(\Phalcon\Mvc\EntityInterface $record) {} diff --git a/ide/stubs/Phalcon/mvc/model/validator/Exclusionin.php b/ide/stubs/Phalcon/mvc/model/validator/Exclusionin.php index bd6245dc6..9fe76f237 100644 --- a/ide/stubs/Phalcon/mvc/model/validator/Exclusionin.php +++ b/ide/stubs/Phalcon/mvc/model/validator/Exclusionin.php @@ -4,27 +4,32 @@ /** * Phalcon\Mvc\Model\Validator\ExclusionIn + * * Check if a value is not included into a list of values + * * This validator is only for use with Phalcon\Mvc\Collection. If you are using * Phalcon\Mvc\Model, please use the validators provided by Phalcon\Validation. + * * * use Phalcon\Mvc\Model\Validator\ExclusionIn as ExclusionInValidator; + * * class Subscriptors extends \Phalcon\Mvc\Collection * { - * public function validation() - * { - * $this->validate( - * new ExclusionInValidator( - * [ - * "field" => "status", - * "domain" => ["A", "I"], - * ] - * ) - * ); - * if ($this->validationHasFailed() === true) { - * return false; - * } - * } + * public function validation() + * { + * $this->validate( + * new ExclusionInValidator( + * [ + * "field" => "status", + * "domain" => ["A", "I"], + * ] + * ) + * ); + * + * if ($this->validationHasFailed() === true) { + * return false; + * } + * } * } * */ @@ -34,8 +39,8 @@ class Exclusionin extends \Phalcon\Mvc\Model\Validator /** * Executes the validator * - * @param mixed $record - * @return bool + * @param \Phalcon\Mvc\EntityInterface $record + * @return bool */ public function validate(\Phalcon\Mvc\EntityInterface $record) {} diff --git a/ide/stubs/Phalcon/mvc/model/validator/Inclusionin.php b/ide/stubs/Phalcon/mvc/model/validator/Inclusionin.php index b18816579..5e07950eb 100644 --- a/ide/stubs/Phalcon/mvc/model/validator/Inclusionin.php +++ b/ide/stubs/Phalcon/mvc/model/validator/Inclusionin.php @@ -4,27 +4,32 @@ /** * Phalcon\Mvc\Model\Validator\InclusionIn + * * Check if a value is included into a list of values + * * This validator is only for use with Phalcon\Mvc\Collection. If you are using * Phalcon\Mvc\Model, please use the validators provided by Phalcon\Validation. + * * * use Phalcon\Mvc\Model\Validator\InclusionIn as InclusionInValidator; + * * class Subscriptors extends \Phalcon\Mvc\Collection * { - * public function validation() - * { - * $this->validate( - * new InclusionInValidator( - * [ - * "field" => "status", - * "domain" => ["A", "I"], - * ] - * ) - * ); - * if ($this->validationHasFailed() === true) { - * return false; - * } - * } + * public function validation() + * { + * $this->validate( + * new InclusionInValidator( + * [ + * "field" => "status", + * "domain" => ["A", "I"], + * ] + * ) + * ); + * + * if ($this->validationHasFailed() === true) { + * return false; + * } + * } * } * */ @@ -34,8 +39,8 @@ class Inclusionin extends \Phalcon\Mvc\Model\Validator /** * Executes validator * - * @param mixed $record - * @return bool + * @param \Phalcon\Mvc\EntityInterface $record + * @return bool */ public function validate(\Phalcon\Mvc\EntityInterface $record) {} diff --git a/ide/stubs/Phalcon/mvc/model/validator/Ip.php b/ide/stubs/Phalcon/mvc/model/validator/Ip.php index b4c032bec..93a716604 100644 --- a/ide/stubs/Phalcon/mvc/model/validator/Ip.php +++ b/ide/stubs/Phalcon/mvc/model/validator/Ip.php @@ -4,52 +4,59 @@ /** * Phalcon\Mvc\Model\Validator\IP + * * Validates that a value is ipv4 address in valid range + * * This validator is only for use with Phalcon\Mvc\Collection. If you are using * Phalcon\Mvc\Model, please use the validators provided by Phalcon\Validation. + * * * use Phalcon\Mvc\Model\Validator\Ip; + * * class Data extends \Phalcon\Mvc\Collection * { - * public function validation() - * { - * // Any pubic IP - * $this->validate( - * new IP( - * [ - * "field" => "server_ip", - * "version" => IP::VERSION_4 | IP::VERSION_6, // v6 and v4. The same if not specified - * "allowReserved" => false, // False if not specified. Ignored for v6 - * "allowPrivate" => false, // False if not specified - * "message" => "IP address has to be correct", - * ] - * ) - * ); - * // Any public v4 address - * $this->validate( - * new IP( - * [ - * "field" => "ip_4", - * "version" => IP::VERSION_4, - * "message" => "IP address has to be correct", - * ] - * ) - * ); - * // Any v6 address - * $this->validate( - * new IP( - * [ - * "field" => "ip6", - * "version" => IP::VERSION_6, - * "allowPrivate" => true, - * "message" => "IP address has to be correct", - * ] - * ) - * ); - * if ($this->validationHasFailed() === true) { - * return false; - * } - * } + * public function validation() + * { + * // Any pubic IP + * $this->validate( + * new IP( + * [ + * "field" => "server_ip", + * "version" => IP::VERSION_4 | IP::VERSION_6, // v6 and v4. The same if not specified + * "allowReserved" => false, // False if not specified. Ignored for v6 + * "allowPrivate" => false, // False if not specified + * "message" => "IP address has to be correct", + * ] + * ) + * ); + * + * // Any public v4 address + * $this->validate( + * new IP( + * [ + * "field" => "ip_4", + * "version" => IP::VERSION_4, + * "message" => "IP address has to be correct", + * ] + * ) + * ); + * + * // Any v6 address + * $this->validate( + * new IP( + * [ + * "field" => "ip6", + * "version" => IP::VERSION_6, + * "allowPrivate" => true, + * "message" => "IP address has to be correct", + * ] + * ) + * ); + * + * if ($this->validationHasFailed() === true) { + * return false; + * } + * } * } * */ @@ -65,8 +72,8 @@ class Ip extends \Phalcon\Mvc\Model\Validator /** * Executes the validator * - * @param mixed $record - * @return bool + * @param \Phalcon\Mvc\EntityInterface $record + * @return bool */ public function validate(\Phalcon\Mvc\EntityInterface $record) {} diff --git a/ide/stubs/Phalcon/mvc/model/validator/Numericality.php b/ide/stubs/Phalcon/mvc/model/validator/Numericality.php index 0a63b8f22..95c8aebb6 100644 --- a/ide/stubs/Phalcon/mvc/model/validator/Numericality.php +++ b/ide/stubs/Phalcon/mvc/model/validator/Numericality.php @@ -4,26 +4,31 @@ /** * Phalcon\Mvc\Model\Validator\Numericality + * * Allows to validate if a field has a valid numeric format + * * This validator is only for use with Phalcon\Mvc\Collection. If you are using * Phalcon\Mvc\Model, please use the validators provided by Phalcon\Validation. + * * * use Phalcon\Mvc\Model\Validator\Numericality as NumericalityValidator; + * * class Products extends \Phalcon\Mvc\Collection * { - * public function validation() - * { - * $this->validate( - * new NumericalityValidator( - * [ - * "field" => "price", - * ] - * ) - * ); - * if ($this->validationHasFailed() === true) { - * return false; - * } - * } + * public function validation() + * { + * $this->validate( + * new NumericalityValidator( + * [ + * "field" => "price", + * ] + * ) + * ); + * + * if ($this->validationHasFailed() === true) { + * return false; + * } + * } * } * */ @@ -33,8 +38,8 @@ class Numericality extends \Phalcon\Mvc\Model\Validator /** * Executes the validator * - * @param mixed $record - * @return bool + * @param \Phalcon\Mvc\EntityInterface $record + * @return bool */ public function validate(\Phalcon\Mvc\EntityInterface $record) {} diff --git a/ide/stubs/Phalcon/mvc/model/validator/PresenceOf.php b/ide/stubs/Phalcon/mvc/model/validator/PresenceOf.php index 3fb43591a..93771f80c 100644 --- a/ide/stubs/Phalcon/mvc/model/validator/PresenceOf.php +++ b/ide/stubs/Phalcon/mvc/model/validator/PresenceOf.php @@ -4,27 +4,32 @@ /** * Phalcon\Mvc\Model\Validator\PresenceOf + * * Allows to validate if a filed have a value different of null and empty string ("") + * * This validator is only for use with Phalcon\Mvc\Collection. If you are using * Phalcon\Mvc\Model, please use the validators provided by Phalcon\Validation. + * * * use Phalcon\Mvc\Model\Validator\PresenceOf; + * * class Subscriptors extends \Phalcon\Mvc\Collection * { - * public function validation() - * { - * $this->validate( - * new PresenceOf( - * [ - * "field" => "name", - * "message" => "The name is required", - * ] - * ) - * ); - * if ($this->validationHasFailed() === true) { - * return false; - * } - * } + * public function validation() + * { + * $this->validate( + * new PresenceOf( + * [ + * "field" => "name", + * "message" => "The name is required", + * ] + * ) + * ); + * + * if ($this->validationHasFailed() === true) { + * return false; + * } + * } * } * */ @@ -34,8 +39,8 @@ class PresenceOf extends \Phalcon\Mvc\Model\Validator /** * Executes the validator * - * @param mixed $record - * @return bool + * @param \Phalcon\Mvc\EntityInterface $record + * @return bool */ public function validate(\Phalcon\Mvc\EntityInterface $record) {} diff --git a/ide/stubs/Phalcon/mvc/model/validator/Regex.php b/ide/stubs/Phalcon/mvc/model/validator/Regex.php index b34253f28..451a60bb5 100644 --- a/ide/stubs/Phalcon/mvc/model/validator/Regex.php +++ b/ide/stubs/Phalcon/mvc/model/validator/Regex.php @@ -4,27 +4,32 @@ /** * Phalcon\Mvc\Model\Validator\Regex + * * Allows validate if the value of a field matches a regular expression + * * This validator is only for use with Phalcon\Mvc\Collection. If you are using * Phalcon\Mvc\Model, please use the validators provided by Phalcon\Validation. + * * * use Phalcon\Mvc\Model\Validator\Regex as RegexValidator; + * * class Subscriptors extends \Phalcon\Mvc\Collection * { - * public function validation() - * { - * $this->validate( - * new RegexValidator( - * [ - * "field" => "created_at", - * "pattern" => "/^[0-9]{4}[-\/](0[1-9]|1[12])[-\/](0[1-9]|[12][0-9]|3[01])/", - * ] - * ) - * ); - * if ($this->validationHasFailed() == true) { - * return false; - * } - * } + * public function validation() + * { + * $this->validate( + * new RegexValidator( + * [ + * "field" => "created_at", + * "pattern" => "/^[0-9]{4}[-\/](0[1-9]|1[12])[-\/](0[1-9]|[12][0-9]|3[01])/", + * ] + * ) + * ); + * + * if ($this->validationHasFailed() == true) { + * return false; + * } + * } * } * */ @@ -34,8 +39,8 @@ class Regex extends \Phalcon\Mvc\Model\Validator /** * Executes the validator * - * @param mixed $record - * @return bool + * @param \Phalcon\Mvc\EntityInterface $record + * @return bool */ public function validate(\Phalcon\Mvc\EntityInterface $record) {} diff --git a/ide/stubs/Phalcon/mvc/model/validator/StringLength.php b/ide/stubs/Phalcon/mvc/model/validator/StringLength.php index b372ff3fc..550439ad9 100644 --- a/ide/stubs/Phalcon/mvc/model/validator/StringLength.php +++ b/ide/stubs/Phalcon/mvc/model/validator/StringLength.php @@ -4,30 +4,35 @@ /** * Phalcon\Mvc\Model\Validator\StringLength + * * Simply validates specified string length constraints + * * This validator is only for use with Phalcon\Mvc\Collection. If you are using * Phalcon\Mvc\Model, please use the validators provided by Phalcon\Validation. + * * * use Phalcon\Mvc\Model\Validator\StringLength as StringLengthValidator; + * * class Subscriptors extends \Phalcon\Mvc\Collection * { - * public function validation() - * { - * $this->validate( - * new StringLengthValidator( - * [ - * "field" => "name_last", - * "max" => 50, - * "min" => 2, - * "messageMaximum" => "We don't like really long names", - * "messageMinimum" => "We want more than just their initials", - * ] - * ) - * ); - * if ($this->validationHasFailed() === true) { - * return false; - * } - * } + * public function validation() + * { + * $this->validate( + * new StringLengthValidator( + * [ + * "field" => "name_last", + * "max" => 50, + * "min" => 2, + * "messageMaximum" => "We don't like really long names", + * "messageMinimum" => "We want more than just their initials", + * ] + * ) + * ); + * + * if ($this->validationHasFailed() === true) { + * return false; + * } + * } * } * */ @@ -37,8 +42,8 @@ class StringLength extends \Phalcon\Mvc\Model\Validator /** * Executes the validator * - * @param mixed $record - * @return bool + * @param \Phalcon\Mvc\EntityInterface $record + * @return bool */ public function validate(\Phalcon\Mvc\EntityInterface $record) {} diff --git a/ide/stubs/Phalcon/mvc/model/validator/Uniqueness.php b/ide/stubs/Phalcon/mvc/model/validator/Uniqueness.php index 50e280fba..c5c01511a 100644 --- a/ide/stubs/Phalcon/mvc/model/validator/Uniqueness.php +++ b/ide/stubs/Phalcon/mvc/model/validator/Uniqueness.php @@ -4,29 +4,34 @@ /** * Phalcon\Mvc\Model\Validator\Uniqueness + * * Validates that a field or a combination of a set of fields are not * present more than once in the existing records of the related table + * * This validator is only for use with Phalcon\Mvc\Collection. If you are using * Phalcon\Mvc\Model, please use the validators provided by Phalcon\Validation. + * * * use Phalcon\Mvc\Collection; * use Phalcon\Mvc\Model\Validator\Uniqueness; + * * class Subscriptors extends Collection * { - * public function validation() - * { - * $this->validate( - * new Uniqueness( - * [ - * "field" => "email", - * "message" => "Value of field 'email' is already present in another record", - * ] - * ) - * ); - * if ($this->validationHasFailed() === true) { - * return false; - * } - * } + * public function validation() + * { + * $this->validate( + * new Uniqueness( + * [ + * "field" => "email", + * "message" => "Value of field 'email' is already present in another record", + * ] + * ) + * ); + * + * if ($this->validationHasFailed() === true) { + * return false; + * } + * } * } * */ @@ -36,8 +41,8 @@ class Uniqueness extends \Phalcon\Mvc\Model\Validator /** * Executes the validator * - * @param mixed $record - * @return bool + * @param \Phalcon\Mvc\EntityInterface $record + * @return bool */ public function validate(\Phalcon\Mvc\EntityInterface $record) {} diff --git a/ide/stubs/Phalcon/mvc/model/validator/Url.php b/ide/stubs/Phalcon/mvc/model/validator/Url.php index b7eeb91f3..37aa9d4c5 100644 --- a/ide/stubs/Phalcon/mvc/model/validator/Url.php +++ b/ide/stubs/Phalcon/mvc/model/validator/Url.php @@ -4,26 +4,31 @@ /** * Phalcon\Mvc\Model\Validator\Url + * * Allows to validate if a field has a url format + * * This validator is only for use with Phalcon\Mvc\Collection. If you are using * Phalcon\Mvc\Model, please use the validators provided by Phalcon\Validation. + * * * use Phalcon\Mvc\Model\Validator\Url as UrlValidator; + * * class Posts extends \Phalcon\Mvc\Collection * { - * public function validation() - * { - * $this->validate( - * new UrlValidator( - * [ - * "field" => "source_url", - * ] - * ) - * ); - * if ($this->validationHasFailed() === true) { - * return false; - * } - * } + * public function validation() + * { + * $this->validate( + * new UrlValidator( + * [ + * "field" => "source_url", + * ] + * ) + * ); + * + * if ($this->validationHasFailed() === true) { + * return false; + * } + * } * } * */ @@ -33,8 +38,8 @@ class Url extends \Phalcon\Mvc\Model\Validator /** * Executes the validator * - * @param mixed $record - * @return bool + * @param \Phalcon\Mvc\EntityInterface $record + * @return bool */ public function validate(\Phalcon\Mvc\EntityInterface $record) {} diff --git a/ide/stubs/Phalcon/mvc/router/Annotations.php b/ide/stubs/Phalcon/mvc/router/Annotations.php index bf0209f41..25a670185 100644 --- a/ide/stubs/Phalcon/mvc/router/Annotations.php +++ b/ide/stubs/Phalcon/mvc/router/Annotations.php @@ -4,18 +4,23 @@ /** * Phalcon\Mvc\Router\Annotations + * * A router that reads routes annotations from classes/resources + * * * use Phalcon\Mvc\Router\Annotations; + * * $di->setShared( - * "router", - * function() { - * // Use the annotations router - * $router = new Annotations(false); - * // This will do the same as above but only if the handled uri starts with /robots - * $router->addResource("Robots", "/robots"); - * return $router; - * } + * "router", + * function() { + * // Use the annotations router + * $router = new Annotations(false); + * + * // This will do the same as above but only if the handled uri starts with /robots + * $router->addResource("Robots", "/robots"); + * + * return $router; + * } * ); * */ @@ -38,9 +43,9 @@ class Annotations extends \Phalcon\Mvc\Router * Adds a resource to the annotations handler * A resource is a class that contains routing annotations * - * @param string $handler - * @param string $prefix - * @return Annotations + * @param string $handler + * @param string $prefix + * @return Annotations */ public function addResource($handler, $prefix = null) {} @@ -49,57 +54,57 @@ public function addResource($handler, $prefix = null) {} * A resource is a class that contains routing annotations * The class is located in a module * - * @param string $module - * @param string $handler - * @param string $prefix - * @return Annotations + * @param string $module + * @param string $handler + * @param string $prefix + * @return Annotations */ public function addModuleResource($module, $handler, $prefix = null) {} /** * Produce the routing parameters from the rewrite information * - * @param string $uri + * @param string $uri */ public function handle($uri = null) {} /** * Checks for annotations in the controller docblock * - * @param string $handler - * @param mixed $annotation + * @param string $handler + * @param \Phalcon\Annotations\Annotation $annotation */ public function processControllerAnnotation($handler, \Phalcon\Annotations\Annotation $annotation) {} /** * Checks for annotations in the public methods of the controller * - * @param string $module - * @param string $namespaceName - * @param string $controller - * @param string $action - * @param mixed $annotation + * @param string $module + * @param string $namespaceName + * @param string $controller + * @param string $action + * @param \Phalcon\Annotations\Annotation $annotation */ public function processActionAnnotation($module, $namespaceName, $controller, $action, \Phalcon\Annotations\Annotation $annotation) {} /** * Changes the controller class suffix * - * @param string $controllerSuffix + * @param string $controllerSuffix */ public function setControllerSuffix($controllerSuffix) {} /** * Changes the action method suffix * - * @param string $actionSuffix + * @param string $actionSuffix */ public function setActionSuffix($actionSuffix) {} /** * Return the registered resources * - * @return array + * @return array */ public function getResources() {} diff --git a/ide/stubs/Phalcon/mvc/router/Exception.php b/ide/stubs/Phalcon/mvc/router/Exception.php index e8a40f672..6811d962b 100644 --- a/ide/stubs/Phalcon/mvc/router/Exception.php +++ b/ide/stubs/Phalcon/mvc/router/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Router\Exception + * * Exceptions thrown in Phalcon\Mvc\Router will use this class */ class Exception extends \Phalcon\Exception diff --git a/ide/stubs/Phalcon/mvc/router/Group.php b/ide/stubs/Phalcon/mvc/router/Group.php index 69885c5ee..155882f45 100644 --- a/ide/stubs/Phalcon/mvc/router/Group.php +++ b/ide/stubs/Phalcon/mvc/router/Group.php @@ -4,40 +4,48 @@ /** * Phalcon\Mvc\Router\Group + * * Helper class to create a group of routes with common attributes + * * * $router = new \Phalcon\Mvc\Router(); + * * //Create a group with a common module and controller * $blog = new Group( - * [ - * "module" => "blog", - * "controller" => "index", - * ] + * [ + * "module" => "blog", + * "controller" => "index", + * ] * ); + * * //All the routes start with /blog * $blog->setPrefix("/blog"); + * * //Add a route to the group * $blog->add( - * "/save", - * [ - * "action" => "save", - * ] + * "/save", + * [ + * "action" => "save", + * ] * ); + * * //Add another route to the group * $blog->add( - * "/edit/{id}", - * [ - * "action" => "edit", - * ] + * "/edit/{id}", + * [ + * "action" => "edit", + * ] * ); + * * //This route maps to a controller different than the default * $blog->add( - * "/blog", - * [ - * "controller" => "about", - * "action" => "index", - * ] + * "/blog", + * [ + * "controller" => "about", + * "action" => "index", + * ] * ); + * * //Add the group to the router * $router->mount($blog); * @@ -63,37 +71,37 @@ class Group implements \Phalcon\Mvc\Router\GroupInterface /** * Phalcon\Mvc\Router\Group constructor * - * @param mixed $paths + * @param mixed $paths */ public function __construct($paths = null) {} /** * Set a hostname restriction for all the routes in the group * - * @param string $hostname - * @return GroupInterface + * @param string $hostname + * @return GroupInterface */ public function setHostname($hostname) {} /** * Returns the hostname restriction * - * @return string + * @return string */ public function getHostname() {} /** * Set a common uri prefix for all the routes in this group * - * @param string $prefix - * @return GroupInterface + * @param string $prefix + * @return GroupInterface */ public function setPrefix($prefix) {} /** * Returns the common prefix for all the routes * - * @return string + * @return string */ public function getPrefix() {} @@ -102,113 +110,121 @@ public function getPrefix() {} * The developer can implement any arbitrary conditions here * If the callback returns false the route is treated as not matched * - * @param callable $beforeMatch - * @return GroupInterface + * @param callable $beforeMatch + * @return GroupInterface */ public function beforeMatch($beforeMatch) {} /** * Returns the 'before match' callback if any * - * @return callable + * @return callable */ public function getBeforeMatch() {} /** * Set common paths for all the routes in the group * - * @param mixed $paths - * @return GroupInterface + * @param mixed $paths + * @return GroupInterface */ public function setPaths($paths) {} /** * Returns the common paths defined for this group * - * @return array|string + * @return array|string */ public function getPaths() {} /** * Returns the routes added to the group * - * @return RouteInterface[] + * @return RouteInterface[] */ public function getRoutes() {} /** * Adds a route to the router on any HTTP method + * * * $router->add("/about", "About::index"); * * - * @param string $pattern - * @param mixed $paths - * @param mixed $httpMethods - * @return RouteInterface + * @param string $pattern + * @param mixed $paths + * @param mixed $httpMethods + * @return RouteInterface */ public function add($pattern, $paths = null, $httpMethods = null) {} /** * Adds a route to the router that only match if the HTTP method is GET * - * @param string $pattern - * @param string/array $paths - * @return \Phalcon\Mvc\Router\Route + * + * @param string $pattern + * @param string/array $paths + * @return RouteInterface */ public function addGet($pattern, $paths = null) {} /** * Adds a route to the router that only match if the HTTP method is POST * - * @param string $pattern - * @param string/array $paths - * @return \Phalcon\Mvc\Router\Route + * + * @param string $pattern + * @param string/array $paths + * @return RouteInterface */ public function addPost($pattern, $paths = null) {} /** * Adds a route to the router that only match if the HTTP method is PUT * - * @param string $pattern - * @param string/array $paths - * @return \Phalcon\Mvc\Router\Route + * + * @param string $pattern + * @param string/array $paths + * @return RouteInterface */ public function addPut($pattern, $paths = null) {} /** * Adds a route to the router that only match if the HTTP method is PATCH * - * @param string $pattern - * @param string/array $paths - * @return \Phalcon\Mvc\Router\Route + * + * @param string $pattern + * @param string/array $paths + * @return RouteInterface */ public function addPatch($pattern, $paths = null) {} /** * Adds a route to the router that only match if the HTTP method is DELETE * - * @param string $pattern - * @param string/array $paths - * @return \Phalcon\Mvc\Router\Route + * + * @param string $pattern + * @param string/array $paths + * @return RouteInterface */ public function addDelete($pattern, $paths = null) {} /** * Add a route to the router that only match if the HTTP method is OPTIONS * - * @param string $pattern - * @param string/array $paths - * @return \Phalcon\Mvc\Router\Route + * + * @param string $pattern + * @param string/array $paths + * @return RouteInterface */ public function addOptions($pattern, $paths = null) {} /** * Adds a route to the router that only match if the HTTP method is HEAD * - * @param string $pattern - * @param string/array $paths - * @return \Phalcon\Mvc\Router\Route + * + * @param string $pattern + * @param string/array $paths + * @return RouteInterface */ public function addHead($pattern, $paths = null) {} @@ -220,10 +236,10 @@ public function clear() {} /** * Adds a route applying the common attributes * - * @param string $pattern - * @param mixed $paths - * @param mixed $httpMethods - * @return RouteInterface + * @param string $pattern + * @param mixed $paths + * @param mixed $httpMethods + * @return RouteInterface */ protected function _addRoute($pattern, $paths = null, $httpMethods = null) {} diff --git a/ide/stubs/Phalcon/mvc/router/GroupInterface.php b/ide/stubs/Phalcon/mvc/router/GroupInterface.php index f65d5ebbe..7e0822fa3 100644 --- a/ide/stubs/Phalcon/mvc/router/GroupInterface.php +++ b/ide/stubs/Phalcon/mvc/router/GroupInterface.php @@ -4,39 +4,46 @@ /** * Phalcon\Mvc\Router\GroupInterface + * * * $router = new \Phalcon\Mvc\Router(); + * * // Create a group with a common module and controller * $blog = new Group( - * [ - * "module" => "blog", - * "controller" => "index", - * ] + * [ + * "module" => "blog", + * "controller" => "index", + * ] * ); + * * // All the routes start with /blog * $blog->setPrefix("/blog"); + * * // Add a route to the group * $blog->add( - * "/save", - * [ - * "action" => "save", - * ] + * "/save", + * [ + * "action" => "save", + * ] * ); + * * // Add another route to the group * $blog->add( - * "/edit/{id}", - * [ - * "action" => "edit", - * ] + * "/edit/{id}", + * [ + * "action" => "edit", + * ] * ); + * * // This route maps to a controller different than the default * $blog->add( - * "/blog", - * [ - * "controller" => "about", - * "action" => "index", - * ] + * "/blog", + * [ + * "controller" => "about", + * "action" => "index", + * ] * ); + * * // Add the group to the router * $router->mount($blog); * @@ -47,30 +54,30 @@ interface GroupInterface /** * Set a hostname restriction for all the routes in the group * - * @param string $hostname - * @return GroupInterface + * @param string $hostname + * @return GroupInterface */ public function setHostname($hostname); /** * Returns the hostname restriction * - * @return string + * @return string */ public function getHostname(); /** * Set a common uri prefix for all the routes in this group * - * @param string $prefix - * @return GroupInterface + * @param string $prefix + * @return GroupInterface */ public function setPrefix($prefix); /** * Returns the common prefix for all the routes * - * @return string + * @return string */ public function getPrefix(); @@ -79,113 +86,115 @@ public function getPrefix(); * The developer can implement any arbitrary conditions here * If the callback returns false the route is treated as not matched * - * @param callable $beforeMatch - * @return GroupInterface + * @param callable $beforeMatch + * @return GroupInterface */ public function beforeMatch($beforeMatch); /** * Returns the 'before match' callback if any * - * @return callable + * @return callable */ public function getBeforeMatch(); /** * Set common paths for all the routes in the group * - * @param array $paths - * @return \Phalcon\Mvc\Router\Group + * + * @param array $paths + * @return GroupInterface */ public function setPaths($paths); /** * Returns the common paths defined for this group * - * @return array|string + * @return array|string */ public function getPaths(); /** * Returns the routes added to the group * - * @return RouteInterface[] + * @return \Phalcon\Mvc\Router\RouteInterface[] */ public function getRoutes(); /** * Adds a route to the router on any HTTP method + * * * router->add("/about", "About::index"); * * - * @param string $pattern - * @param mixed $paths - * @param mixed $httpMethods - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @param mixed $httpMethods + * @return \Phalcon\Mvc\Router\RouteInterface */ public function add($pattern, $paths = null, $httpMethods = null); /** * Adds a route to the router that only match if the HTTP method is GET * - * @param string $pattern - * @param mixed $paths - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addGet($pattern, $paths = null); /** * Adds a route to the router that only match if the HTTP method is POST * - * @param string $pattern - * @param mixed $paths - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addPost($pattern, $paths = null); /** * Adds a route to the router that only match if the HTTP method is PUT * - * @param string $pattern - * @param mixed $paths - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addPut($pattern, $paths = null); /** * Adds a route to the router that only match if the HTTP method is PATCH * - * @param string $pattern - * @param mixed $paths - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addPatch($pattern, $paths = null); /** * Adds a route to the router that only match if the HTTP method is DELETE * - * @param string $pattern - * @param mixed $paths - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addDelete($pattern, $paths = null); /** * Add a route to the router that only match if the HTTP method is OPTIONS * - * @param string $pattern - * @param mixed $paths - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addOptions($pattern, $paths = null); /** * Adds a route to the router that only match if the HTTP method is HEAD * - * @param string $pattern - * @param mixed $paths - * @return \Phalcon\Mvc\Router\RouteInterface + * @param string $pattern + * @param mixed $paths + * @return \Phalcon\Mvc\Router\RouteInterface */ public function addHead($pattern, $paths = null); diff --git a/ide/stubs/Phalcon/mvc/router/Route.php b/ide/stubs/Phalcon/mvc/router/Route.php index 5421247fc..0cb23f504 100644 --- a/ide/stubs/Phalcon/mvc/router/Route.php +++ b/ide/stubs/Phalcon/mvc/router/Route.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Router\Route + * * This class represents every route added to the router */ class Route implements \Phalcon\Mvc\Router\RouteInterface @@ -48,81 +49,84 @@ class Route implements \Phalcon\Mvc\Router\RouteInterface /** * Phalcon\Mvc\Router\Route constructor * - * @param string $pattern - * @param mixed $paths - * @param mixed $httpMethods + * @param string $pattern + * @param mixed $paths + * @param mixed $httpMethods */ public function __construct($pattern, $paths = null, $httpMethods = null) {} /** * Replaces placeholders from pattern returning a valid PCRE regular expression * - * @param string $pattern - * @return string + * @param string $pattern + * @return string */ public function compilePattern($pattern) {} /** * Set one or more HTTP methods that constraint the matching of the route + * * * $route->via("GET"); + * * $route->via( - * [ - * "GET", - * "POST", - * ] + * [ + * "GET", + * "POST", + * ] * ); * * - * @param mixed $httpMethods - * @return Route + * @param mixed $httpMethods + * @return Route */ public function via($httpMethods) {} /** * Extracts parameters from a string * - * @param string $pattern - * @return array|bool + * @param string $pattern + * @return array|bool */ public function extractNamedParams($pattern) {} /** * Reconfigure the route adding a new pattern and a set of paths * - * @param string $pattern - * @param mixed $paths + * @param string $pattern + * @param mixed $paths */ public function reConfigure($pattern, $paths = null) {} /** * Returns routePaths * - * @param mixed $paths - * @return array + * @param mixed $paths + * @return array */ public static function getRoutePaths($paths = null) {} /** * Returns the route's name * - * @return string + * @return string */ public function getName() {} /** * Sets the route's name + * * * $router->add( - * "/about", - * [ - * "controller" => "about", - * ] + * "/about", + * [ + * "controller" => "about", + * ] * )->setName("about"); * * - * @param string $name - * @return Route + * @param string $name + * @return Route */ public function setName($name) {} @@ -130,161 +134,166 @@ public function setName($name) {} * Sets a callback that is called if the route is matched. * The developer can implement any arbitrary conditions here * If the callback returns false the route is treated as not matched + * * * $router->add( - * "/login", - * [ - * "module" => "admin", - * "controller" => "session", - * ] + * "/login", + * [ + * "module" => "admin", + * "controller" => "session", + * ] * )->beforeMatch( - * function ($uri, $route) { - * // Check if the request was made with Ajax - * if ($_SERVER["HTTP_X_REQUESTED_WITH"] === "xmlhttprequest") { - * return false; - * } - * return true; - * } + * function ($uri, $route) { + * // Check if the request was made with Ajax + * if ($_SERVER["HTTP_X_REQUESTED_WITH"] === "xmlhttprequest") { + * return false; + * } + * + * return true; + * } * ); * * - * @param mixed $callback - * @return Route + * @param mixed $callback + * @return Route */ public function beforeMatch($callback) {} /** * Returns the 'before match' callback if any * - * @return callable + * @return callable */ public function getBeforeMatch() {} /** * Allows to set a callback to handle the request directly in the route + * * * $router->add( - * "/help", - * [] + * "/help", + * [] * )->match( - * function () { - * return $this->getResponse()->redirect("https://support.google.com/", true); - * } + * function () { + * return $this->getResponse()->redirect("https://support.google.com/", true); + * } * ); * * - * @param mixed $callback - * @return Route + * @param mixed $callback + * @return Route */ public function match($callback) {} /** * Returns the 'match' callback if any * - * @return callable + * @return callable */ public function getMatch() {} /** * Returns the route's id * - * @return string + * @return string */ public function getRouteId() {} /** * Returns the route's pattern * - * @return string + * @return string */ public function getPattern() {} /** * Returns the route's compiled pattern * - * @return string + * @return string */ public function getCompiledPattern() {} /** * Returns the paths * - * @return array + * @return array */ public function getPaths() {} /** * Returns the paths using positions as keys and names as values * - * @return array + * @return array */ public function getReversedPaths() {} /** * Sets a set of HTTP methods that constraint the matching of the route (alias of via) + * * * $route->setHttpMethods("GET"); * $route->setHttpMethods(["GET", "POST"]); * * - * @param mixed $httpMethods - * @return Route + * @param mixed $httpMethods + * @return Route */ public function setHttpMethods($httpMethods) {} /** * Returns the HTTP methods that constraint matching the route * - * @return array|string + * @return array|string */ public function getHttpMethods() {} /** * Sets a hostname restriction to the route + * * * $route->setHostname("localhost"); * * - * @param string $hostname - * @return Route + * @param string $hostname + * @return Route */ public function setHostname($hostname) {} /** * Returns the hostname restriction if any * - * @return string + * @return string */ public function getHostname() {} /** * Sets the group associated with the route * - * @param mixed $group - * @return Route + * @param GroupInterface $group + * @return Route */ public function setGroup(GroupInterface $group) {} /** * Returns the group associated with the route * - * @return null|GroupInterface + * @return null|GroupInterface */ public function getGroup() {} /** * Adds a converter to perform an additional transformation for certain parameter * - * @param string $name - * @param mixed $converter - * @return Route + * @param string $name + * @param mixed $converter + * @return Route */ public function convert($name, $converter) {} /** * Returns the router converter * - * @return array + * @return array */ public function getConverters() {} diff --git a/ide/stubs/Phalcon/mvc/router/RouteInterface.php b/ide/stubs/Phalcon/mvc/router/RouteInterface.php index 1a78b540b..f6f1f6324 100644 --- a/ide/stubs/Phalcon/mvc/router/RouteInterface.php +++ b/ide/stubs/Phalcon/mvc/router/RouteInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Router\RouteInterface + * * Interface for Phalcon\Mvc\Router\Route */ interface RouteInterface @@ -12,102 +13,102 @@ interface RouteInterface /** * Sets a hostname restriction to the route * - * @param string $hostname - * @return RouteInterface + * @param string $hostname + * @return RouteInterface */ public function setHostname($hostname); /** * Returns the hostname restriction if any * - * @return string + * @return string */ public function getHostname(); /** * Replaces placeholders from pattern returning a valid PCRE regular expression * - * @param string $pattern - * @return string + * @param string $pattern + * @return string */ public function compilePattern($pattern); /** * Set one or more HTTP methods that constraint the matching of the route * - * @param mixed $httpMethods + * @param mixed $httpMethods */ public function via($httpMethods); /** * Reconfigure the route adding a new pattern and a set of paths * - * @param string $pattern - * @param mixed $paths + * @param string $pattern + * @param mixed $paths */ public function reConfigure($pattern, $paths = null); /** * Returns the route's name * - * @return string + * @return string */ public function getName(); /** * Sets the route's name * - * @param string $name + * @param string $name */ public function setName($name); /** * Sets a set of HTTP methods that constraint the matching of the route * - * @param mixed $httpMethods - * @return RouteInterface + * @param mixed $httpMethods + * @return RouteInterface */ public function setHttpMethods($httpMethods); /** * Returns the route's id * - * @return string + * @return string */ public function getRouteId(); /** * Returns the route's pattern * - * @return string + * @return string */ public function getPattern(); /** * Returns the route's pattern * - * @return string + * @return string */ public function getCompiledPattern(); /** * Returns the paths * - * @return array + * @return array */ public function getPaths(); /** * Returns the paths using positions as keys and names as values * - * @return array + * @return array */ public function getReversedPaths(); /** * Returns the HTTP methods that constraint matching the route * - * @return string|array + * @return string|array */ public function getHttpMethods(); diff --git a/ide/stubs/Phalcon/mvc/url/Exception.php b/ide/stubs/Phalcon/mvc/url/Exception.php index 92371db53..f10048ee5 100644 --- a/ide/stubs/Phalcon/mvc/url/Exception.php +++ b/ide/stubs/Phalcon/mvc/url/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\Url\Exception + * * Exceptions thrown in Phalcon\Mvc\Url will use this class */ class Exception extends \Phalcon\Exception diff --git a/ide/stubs/Phalcon/mvc/user/Component.php b/ide/stubs/Phalcon/mvc/user/Component.php index e1d156c3a..5089c551c 100644 --- a/ide/stubs/Phalcon/mvc/user/Component.php +++ b/ide/stubs/Phalcon/mvc/user/Component.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\User\Component + * * This class can be used to provide user components easy access to services * in the application */ diff --git a/ide/stubs/Phalcon/mvc/user/Module.php b/ide/stubs/Phalcon/mvc/user/Module.php index ee5d96d74..9b6739f34 100644 --- a/ide/stubs/Phalcon/mvc/user/Module.php +++ b/ide/stubs/Phalcon/mvc/user/Module.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\User\Module + * * This class can be used to provide user modules easy access to services * in the application */ diff --git a/ide/stubs/Phalcon/mvc/user/Plugin.php b/ide/stubs/Phalcon/mvc/user/Plugin.php index 8938a33b3..42ed8e584 100644 --- a/ide/stubs/Phalcon/mvc/user/Plugin.php +++ b/ide/stubs/Phalcon/mvc/user/Plugin.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\User\Plugin + * * This class can be used to provide user plugins an easy access to services * in the application */ diff --git a/ide/stubs/Phalcon/mvc/view/Engine.php b/ide/stubs/Phalcon/mvc/view/Engine.php index 891bb65ef..731d84438 100644 --- a/ide/stubs/Phalcon/mvc/view/Engine.php +++ b/ide/stubs/Phalcon/mvc/view/Engine.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\View\Engine + * * All the template engine adapters must inherit this class. This provides * basic interfacing between the engine and the Phalcon\Mvc\View component. */ @@ -16,31 +17,32 @@ abstract class Engine extends \Phalcon\Di\Injectable implements \Phalcon\Mvc\Vie /** * Phalcon\Mvc\View\Engine constructor * - * @param mixed $view - * @param mixed $dependencyInjector + * @param \Phalcon\Mvc\ViewBaseInterface $view + * @param \Phalcon\DiInterface $dependencyInjector */ public function __construct(\Phalcon\Mvc\ViewBaseInterface $view, \Phalcon\DiInterface $dependencyInjector = null) {} /** * Returns cached output on another view stage * - * @return string + * @return string */ public function getContent() {} /** * Renders a partial inside another view * - * @param string $partialPath - * @param array $params - * @return string + * + * @param string $partialPath + * @param array $params + * @return string */ public function partial($partialPath, $params = null) {} /** * Returns the view component related to the adapter * - * @return \Phalcon\Mvc\ViewBaseInterface + * @return \Phalcon\Mvc\ViewBaseInterface */ public function getView() {} diff --git a/ide/stubs/Phalcon/mvc/view/EngineInterface.php b/ide/stubs/Phalcon/mvc/view/EngineInterface.php index 100e26886..1246301fe 100644 --- a/ide/stubs/Phalcon/mvc/view/EngineInterface.php +++ b/ide/stubs/Phalcon/mvc/view/EngineInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\View\EngineInterface + * * Interface for Phalcon\Mvc\View engine adapters */ interface EngineInterface @@ -12,25 +13,25 @@ interface EngineInterface /** * Returns cached output on another view stage * - * @return array + * @return array */ public function getContent(); /** * Renders a partial inside another view * - * @param string $partialPath - * @param mixed $params - * @return string + * @param string $partialPath + * @param mixed $params + * @return string */ public function partial($partialPath, $params = null); /** * Renders a view using the template engine * - * @param string $path - * @param mixed $params - * @param bool $mustClean + * @param string $path + * @param mixed $params + * @param bool $mustClean */ public function render($path, $params, $mustClean = false); diff --git a/ide/stubs/Phalcon/mvc/view/Exception.php b/ide/stubs/Phalcon/mvc/view/Exception.php index d6208f6cb..7ee9726e8 100644 --- a/ide/stubs/Phalcon/mvc/view/Exception.php +++ b/ide/stubs/Phalcon/mvc/view/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\View\Exception + * * Class for exceptions thrown by Phalcon\Mvc\View */ class Exception extends \Phalcon\Exception diff --git a/ide/stubs/Phalcon/mvc/view/Simple.php b/ide/stubs/Phalcon/mvc/view/Simple.php index 6591ff3e4..1fb164395 100644 --- a/ide/stubs/Phalcon/mvc/view/Simple.php +++ b/ide/stubs/Phalcon/mvc/view/Simple.php @@ -4,23 +4,28 @@ /** * Phalcon\Mvc\View\Simple + * * This component allows to render views without hierarchical levels + * * * use Phalcon\Mvc\View\Simple as View; + * * $view = new View(); + * * // Render a view * echo $view->render( - * "templates/my-view", - * [ - * "some" => $param, - * ] + * "templates/my-view", + * [ + * "some" => $param, + * ] * ); + * * // Or with filename with extension * echo $view->render( - * "templates/my-view.volt", - * [ - * "parameter" => $here, - * ] + * "templates/my-view.volt", + * [ + * "parameter" => $here, + * ] * ); * */ @@ -62,236 +67,252 @@ class Simple extends \Phalcon\Di\Injectable implements \Phalcon\Mvc\ViewBaseInte /** - * @return array|null + * @return array|null */ public function getRegisteredEngines() {} /** * Phalcon\Mvc\View\Simple constructor * - * @param array $options + * @param array $options */ public function __construct(array $options = array()) {} /** * Sets views directory. Depending of your platform, always add a trailing slash or backslash * - * @param string $viewsDir + * @param string $viewsDir */ public function setViewsDir($viewsDir) {} /** * Gets views directory * - * @return string + * @return string */ public function getViewsDir() {} /** * Register templating engines + * * * $this->view->registerEngines( - * [ - * ".phtml" => "Phalcon\\Mvc\\View\\Engine\\Php", - * ".volt" => "Phalcon\\Mvc\\View\\Engine\\Volt", - * ".mhtml" => "MyCustomEngine", - * ] + * [ + * ".phtml" => "Phalcon\\Mvc\\View\\Engine\\Php", + * ".volt" => "Phalcon\\Mvc\\View\\Engine\\Volt", + * ".mhtml" => "MyCustomEngine", + * ] * ); * * - * @param array $engines + * @param array $engines */ public function registerEngines(array $engines) {} /** * Loads registered template engines, if none is registered it will use Phalcon\Mvc\View\Engine\Php * - * @return array + * + * @return array */ protected function _loadTemplateEngines() {} /** * Tries to render the view with every engine registered in the component * - * @param string $path - * @param array $params + * + * @param string $path + * @param array $params */ protected final function _internalRender($path, $params) {} /** * Renders a view * - * @param string $path - * @param array $params - * @return string + * + * @param string $path + * @param array $params + * @return string */ public function render($path, $params = null) {} /** * Renders a partial view + * * * // Show a partial inside another view * $this->partial("shared/footer"); * + * * * // Show a partial inside another view with parameters * $this->partial( - * "shared/footer", - * [ - * "content" => $html, - * ] + * "shared/footer", + * [ + * "content" => $html, + * ] * ); * * - * @param string $partialPath - * @param mixed $params + * @param string $partialPath + * @param mixed $params */ public function partial($partialPath, $params = null) {} /** * Sets the cache options * - * @param array $options - * @return Simple + * @param array $options + * @return Simple */ public function setCacheOptions(array $options) {} /** * Returns the cache options * - * @return array + * + * @return array */ public function getCacheOptions() {} /** * Create a Phalcon\Cache based on the internal cache options * - * @return \Phalcon\Cache\BackendInterface + * @return \Phalcon\Cache\BackendInterface */ protected function _createCache() {} /** * Returns the cache instance used to cache * - * @return \Phalcon\Cache\BackendInterface + * @return \Phalcon\Cache\BackendInterface */ public function getCache() {} /** * Cache the actual view render to certain level + * * * $this->view->cache( - * [ - * "key" => "my-key", - * "lifetime" => 86400, - * ] + * [ + * "key" => "my-key", + * "lifetime" => 86400, + * ] * ); * * - * @param mixed $options - * @return Simple + * @param mixed $options + * @return Simple */ public function cache($options = true) {} /** * Adds parameters to views (alias of setVar) + * * * $this->view->setParamToView("products", $products); * * - * @param string $key - * @param mixed $value - * @return Simple + * @param string $key + * @param mixed $value + * @return Simple */ public function setParamToView($key, $value) {} /** * Set all the render params + * * * $this->view->setVars( - * [ - * "products" => $products, - * ] + * [ + * "products" => $products, + * ] * ); * * - * @param array $params - * @param bool $merge - * @return Simple + * @param array $params + * @param bool $merge + * @return Simple */ public function setVars(array $params, $merge = true) {} /** * Set a single view parameter + * * * $this->view->setVar("products", $products); * * - * @param string $key - * @param mixed $value - * @return Simple + * @param string $key + * @param mixed $value + * @return Simple */ public function setVar($key, $value) {} /** * Returns a parameter previously set in the view * - * @param string $key - * @return mixed|null + * @param string $key + * @return mixed|null */ public function getVar($key) {} /** * Returns parameters to views * - * @return array + * + * @return array */ public function getParamsToView() {} /** * Externally sets the view content + * * * $this->view->setContent("

hello

"); *
* - * @param string $content - * @return Simple + * @param string $content + * @return Simple */ public function setContent($content) {} /** * Returns cached output from another view stage * - * @return string + * @return string */ public function getContent() {} /** * Returns the path of the view that is currently rendered * - * @return string + * + * @return string */ public function getActiveRenderPath() {} /** * Magic method to pass variables to the views + * * * $this->view->products = $products; * * - * @param string $key - * @param mixed $value + * @param string $key + * @param mixed $value */ public function __set($key, $value) {} /** * Magic method to retrieve a variable passed to the view + * * * echo $this->view->products; * * - * @param string $key - * @return mixed|null + * @param string $key + * @return mixed|null */ public function __get($key) {} diff --git a/ide/stubs/Phalcon/mvc/view/engine/Php.php b/ide/stubs/Phalcon/mvc/view/engine/Php.php index 2b72440f6..181e9786f 100644 --- a/ide/stubs/Phalcon/mvc/view/engine/Php.php +++ b/ide/stubs/Phalcon/mvc/view/engine/Php.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\View\Engine\Php + * * Adapter to use PHP itself as templating engine */ class Php extends \Phalcon\Mvc\View\Engine @@ -12,9 +13,9 @@ class Php extends \Phalcon\Mvc\View\Engine /** * Renders a view using the template engine * - * @param string $path - * @param mixed $params - * @param bool $mustClean + * @param string $path + * @param mixed $params + * @param bool $mustClean */ public function render($path, $params, $mustClean = false) {} diff --git a/ide/stubs/Phalcon/mvc/view/engine/Volt.php b/ide/stubs/Phalcon/mvc/view/engine/Volt.php index 0daa6754a..58c65d881 100644 --- a/ide/stubs/Phalcon/mvc/view/engine/Volt.php +++ b/ide/stubs/Phalcon/mvc/view/engine/Volt.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\View\Engine\Volt + * * Designer friendly and fast template engine for PHP written in Zephir/C */ class Volt extends \Phalcon\Mvc\View\Engine @@ -21,83 +22,83 @@ class Volt extends \Phalcon\Mvc\View\Engine /** * Set Volt's options * - * @param array $options + * @param array $options */ public function setOptions(array $options) {} /** * Return Volt's options * - * @return array + * @return array */ public function getOptions() {} /** * Returns the Volt's compiler * - * @return \Phalcon\Mvc\View\Engine\Volt\Compiler + * @return \Phalcon\Mvc\View\Engine\Volt\Compiler */ public function getCompiler() {} /** * Renders a view using the template engine * - * @param string $templatePath - * @param mixed $params - * @param bool $mustClean + * @param string $templatePath + * @param mixed $params + * @param bool $mustClean */ public function render($templatePath, $params, $mustClean = false) {} /** * Length filter. If an array/object is passed a count is performed otherwise a strlen/mb_strlen * - * @param mixed $item - * @return int + * @param mixed $item + * @return int */ public function length($item) {} /** * Checks if the needle is included in the haystack * - * @param mixed $needle - * @param mixed $haystack - * @return bool + * @param mixed $needle + * @param mixed $haystack + * @return bool */ public function isIncluded($needle, $haystack) {} /** * Performs a string conversion * - * @param string $text - * @param string $from - * @param string $to - * @return string + * @param string $text + * @param string $from + * @param string $to + * @return string */ public function convertEncoding($text, $from, $to) {} /** * Extracts a slice from a string/array/traversable object value * - * @param mixed $value - * @param int $start - * @param mixed $end + * @param mixed $value + * @param int $start + * @param mixed $end */ public function slice($value, $start = 0, $end = null) {} /** * Sorts an array * - * @param array $value - * @return array + * @param array $value + * @return array */ public function sort(array $value) {} /** * Checks if a macro is defined and calls it * - * @param string $name - * @param array $arguments - * @return mixed + * @param string $name + * @param array $arguments + * @return mixed */ public function callMacro($name, array $arguments = array()) {} diff --git a/ide/stubs/Phalcon/mvc/view/engine/volt/Compiler.php b/ide/stubs/Phalcon/mvc/view/engine/volt/Compiler.php index 204bfd369..bb2c35457 100644 --- a/ide/stubs/Phalcon/mvc/view/engine/volt/Compiler.php +++ b/ide/stubs/Phalcon/mvc/view/engine/volt/Compiler.php @@ -4,10 +4,14 @@ /** * Phalcon\Mvc\View\Engine\Volt\Compiler + * * This class reads and compiles Volt templates into PHP plain code + * * * $compiler = new \Phalcon\Mvc\View\Engine\Volt\Compiler(); + * * $compiler->compile("views/partials/header.volt"); + * * require $compiler->getCompiledTemplatePath(); * */ @@ -83,372 +87,385 @@ class Compiler implements \Phalcon\Di\InjectionAwareInterface /** * Phalcon\Mvc\View\Engine\Volt\Compiler * - * @param mixed $view + * @param \Phalcon\Mvc\ViewBaseInterface $view */ public function __construct(\Phalcon\Mvc\ViewBaseInterface $view = null) {} /** * Sets the dependency injector * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the internal dependency injector * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI() {} /** * Sets the compiler options * - * @param array $options + * @param array $options */ public function setOptions(array $options) {} /** * Sets a single compiler option * - * @param string $option - * @param mixed $value + * + * @param string $option + * @param mixed $value */ public function setOption($option, $value) {} /** * Returns a compiler's option * - * @param string $option - * @return string + * + * @param string $option + * @return string */ public function getOption($option) {} /** * Returns the compiler options * - * @return array + * @return array */ public function getOptions() {} /** * Fires an event to registered extensions * - * @param string $name - * @param array $arguments - * @return mixed + * + * @param string $name + * @param array $arguments + * @return mixed */ public final function fireExtensionEvent($name, $arguments = null) {} /** * Registers a Volt's extension * - * @param mixed $extension - * @return Compiler + * @param mixed $extension + * @return Compiler */ public function addExtension($extension) {} /** * Returns the list of extensions registered in Volt * - * @return array + * @return array */ public function getExtensions() {} /** * Register a new function in the compiler * - * @param string $name - * @param mixed $definition - * @return Compiler + * @param string $name + * @param mixed $definition + * @return Compiler */ public function addFunction($name, $definition) {} /** * Register the user registered functions * - * @return array + * @return array */ public function getFunctions() {} /** * Register a new filter in the compiler * - * @param string $name - * @param mixed $definition - * @return Compiler + * @param string $name + * @param mixed $definition + * @return Compiler */ public function addFilter($name, $definition) {} /** * Register the user registered filters * - * @return array + * @return array */ public function getFilters() {} /** * Set a unique prefix to be used as prefix for compiled variables * - * @param string $prefix - * @return Compiler + * @param string $prefix + * @return Compiler */ public function setUniquePrefix($prefix) {} /** * Return a unique prefix to be used as prefix for compiled variables and contexts * - * @return string + * @return string */ public function getUniquePrefix() {} /** * Resolves attribute reading * - * @param array $expr - * @return string + * @param array $expr + * @return string */ public function attributeReader(array $expr) {} /** * Resolves function intermediate code into PHP function calls * - * @param array $expr - * @return string + * @param array $expr + * @return string */ public function functionCall(array $expr) {} /** * Resolves filter intermediate code into a valid PHP expression * - * @param array $test - * @param string $left - * @return string + * @param array $test + * @param string $left + * @return string */ public function resolveTest(array $test, $left) {} /** * Resolves filter intermediate code into PHP function calls * - * @param array $filter - * @param string $left - * @return string + * @param array $filter + * @param string $left + * @return string */ final protected function resolveFilter(array $filter, $left) {} /** * Resolves an expression node in an AST volt tree * - * @param array $expr - * @return string + * @param array $expr + * @return string */ final public function expression(array $expr) {} /** * Compiles a block of statements * - * @param array $statements - * @return string|array + * + * @param array $statements + * @return string|array */ final protected function _statementListOrExtends($statements) {} /** * Compiles a "foreach" intermediate code representation into plain PHP code * - * @param array $statement - * @param bool $extendsMode - * @return string + * @param array $statement + * @param bool $extendsMode + * @return string */ public function compileForeach(array $statement, $extendsMode = false) {} /** * Generates a 'forelse' PHP code * - * @return string + * @return string */ public function compileForElse() {} /** * Compiles a 'if' statement returning PHP code * - * @param array $statement - * @param bool $extendsMode - * @return string + * @param array $statement + * @param bool $extendsMode + * @return string */ public function compileIf(array $statement, $extendsMode = false) {} /** * Compiles a "elseif" statement returning PHP code * - * @param array $statement - * @return string + * @param array $statement + * @return string */ public function compileElseIf(array $statement) {} /** * Compiles a "cache" statement returning PHP code * - * @param array $statement - * @param bool $extendsMode - * @return string + * @param array $statement + * @param bool $extendsMode + * @return string */ public function compileCache(array $statement, $extendsMode = false) {} /** * Compiles a "set" statement returning PHP code * - * @param array $statement - * @return string + * @param array $statement + * @return string */ public function compileSet(array $statement) {} /** * Compiles a "do" statement returning PHP code * - * @param array $statement - * @return string + * @param array $statement + * @return string */ public function compileDo(array $statement) {} /** * Compiles a "return" statement returning PHP code * - * @param array $statement - * @return string + * @param array $statement + * @return string */ public function compileReturn(array $statement) {} /** * Compiles a "autoescape" statement returning PHP code * - * @param array $statement - * @param bool $extendsMode - * @return string + * @param array $statement + * @param bool $extendsMode + * @return string */ public function compileAutoEscape(array $statement, $extendsMode) {} /** * Compiles a '{{' '}}' statement returning PHP code * - * @param array $statement - * @param boolean $extendsMode - * @return string + * + * @param array $statement + * @param boolean $extendsMode + * @return string */ public function compileEcho(array $statement) {} /** * Compiles a 'include' statement returning PHP code * - * @param array $statement - * @return string + * @param array $statement + * @return string */ public function compileInclude(array $statement) {} /** * Compiles macros * - * @param array $statement - * @param bool $extendsMode - * @return string + * @param array $statement + * @param bool $extendsMode + * @return string */ public function compileMacro(array $statement, $extendsMode) {} /** * Compiles calls to macros * - * @param array $statement - * @param boolean $extendsMode - * @return string + * + * @param array $statement + * @param boolean $extendsMode + * @return string */ public function compileCall(array $statement, $extendsMode) {} /** * Traverses a statement list compiling each of its nodes * - * @param array $statements - * @param bool $extendsMode - * @return string + * @param array $statements + * @param bool $extendsMode + * @return string */ final protected function _statementList(array $statements, $extendsMode = false) {} /** * Compiles a Volt source code returning a PHP plain version * - * @param string $viewCode - * @param bool $extendsMode - * @return string + * @param string $viewCode + * @param bool $extendsMode + * @return string */ protected function _compileSource($viewCode, $extendsMode = false) {} /** * Compiles a template into a string + * * * echo $compiler->compileString('{{ "hello world" }}'); * * - * @param string $viewCode - * @param bool $extendsMode - * @return string + * @param string $viewCode + * @param bool $extendsMode + * @return string */ 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"); * * - * @param string $path - * @param string $compiledPath - * @param boolean $extendsMode - * @return string|array + * + * @param string $path + * @param string $compiledPath + * @param boolean $extendsMode + * @return string|array */ public function compileFile($path, $compiledPath, $extendsMode = false) {} /** * Compiles a template into a file applying the compiler options * This method does not return the compiled path if the template was not compiled + * * * $compiler->compile("views/layouts/main.volt"); + * * require $compiler->getCompiledTemplatePath(); * * - * @param string $templatePath - * @param bool $extendsMode + * @param string $templatePath + * @param bool $extendsMode */ public function compile($templatePath, $extendsMode = false) {} /** * Returns the path that is currently being compiled * - * @return string + * @return string */ public function getTemplatePath() {} /** * Returns the path to the last compiled template * - * @return string + * @return string */ public function getCompiledTemplatePath() {} /** * Parses a Volt template returning its intermediate representation + * * * print_r( - * $compiler->parse("{{ 3 + 2 }}") + * $compiler->parse("{{ 3 + 2 }}") * ); * * - * @param string $viewCode - * @return array + * + * @param string $viewCode + * @return array */ public function parse($viewCode) {} /** * Gets the final path with VIEW * - * @param string $path + * @param string $path */ protected function getFinalPath($path) {} diff --git a/ide/stubs/Phalcon/mvc/view/engine/volt/Exception.php b/ide/stubs/Phalcon/mvc/view/engine/volt/Exception.php index 502581d74..386a79e80 100644 --- a/ide/stubs/Phalcon/mvc/view/engine/volt/Exception.php +++ b/ide/stubs/Phalcon/mvc/view/engine/volt/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Mvc\View\Exception + * * Class for exceptions thrown by Phalcon\Mvc\View */ class Exception extends \Phalcon\Mvc\View\Exception diff --git a/ide/stubs/Phalcon/paginator/Adapter.php b/ide/stubs/Phalcon/paginator/Adapter.php index cfb9d4fb2..fe515685a 100644 --- a/ide/stubs/Phalcon/paginator/Adapter.php +++ b/ide/stubs/Phalcon/paginator/Adapter.php @@ -21,23 +21,23 @@ abstract class Adapter implements \Phalcon\Paginator\AdapterInterface /** * Set the current page number * - * @param int $page - * @return Adapter + * @param int $page + * @return Adapter */ public function setCurrentPage($page) {} /** * Set current rows limit * - * @param int $limitRows - * @return Adapter + * @param int $limitRows + * @return Adapter */ public function setLimit($limitRows) {} /** * Get current rows limit * - * @return int + * @return int */ public function getLimit() {} diff --git a/ide/stubs/Phalcon/paginator/AdapterInterface.php b/ide/stubs/Phalcon/paginator/AdapterInterface.php index 358618fa4..6585ff60a 100644 --- a/ide/stubs/Phalcon/paginator/AdapterInterface.php +++ b/ide/stubs/Phalcon/paginator/AdapterInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Paginator\AdapterInterface + * * Interface for Phalcon\Paginator adapters */ interface AdapterInterface @@ -12,28 +13,28 @@ interface AdapterInterface /** * Set the current page number * - * @param int $page + * @param int $page */ public function setCurrentPage($page); /** * Returns a slice of the resultset to show in the pagination * - * @return \stdClass + * @return \stdClass */ public function getPaginate(); /** * Set current rows limit * - * @param int $limit + * @param int $limit */ public function setLimit($limit); /** * Get current rows limit * - * @return int + * @return int */ public function getLimit(); diff --git a/ide/stubs/Phalcon/paginator/Exception.php b/ide/stubs/Phalcon/paginator/Exception.php index 2c47882f7..031cfb367 100644 --- a/ide/stubs/Phalcon/paginator/Exception.php +++ b/ide/stubs/Phalcon/paginator/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Paginator\Exception + * * Exceptions thrown in Phalcon\Paginator will use this class */ class Exception extends \Phalcon\Exception diff --git a/ide/stubs/Phalcon/paginator/adapter/Model.php b/ide/stubs/Phalcon/paginator/adapter/Model.php index a87a329e1..704870371 100644 --- a/ide/stubs/Phalcon/paginator/adapter/Model.php +++ b/ide/stubs/Phalcon/paginator/adapter/Model.php @@ -4,16 +4,20 @@ /** * Phalcon\Paginator\Adapter\Model + * * This adapter allows to paginate data using a Phalcon\Mvc\Model resultset as a base. + * * * use Phalcon\Paginator\Adapter\Model; + * * $paginator = new Model( - * [ - * "data" => Robots::find(), - * "limit" => 25, - * "page" => $currentPage, - * ] + * [ + * "data" => Robots::find(), + * "limit" => 25, + * "page" => $currentPage, + * ] * ); + * * $paginate = $paginator->getPaginate(); * */ @@ -28,14 +32,14 @@ class Model extends \Phalcon\Paginator\Adapter /** * Phalcon\Paginator\Adapter\Model constructor * - * @param array $config + * @param array $config */ public function __construct(array $config) {} /** * Returns a slice of the resultset to show in the pagination * - * @return \stdClass + * @return \stdClass */ public function getPaginate() {} diff --git a/ide/stubs/Phalcon/paginator/adapter/NativeArray.php b/ide/stubs/Phalcon/paginator/adapter/NativeArray.php index d51014d8f..e8e042473 100644 --- a/ide/stubs/Phalcon/paginator/adapter/NativeArray.php +++ b/ide/stubs/Phalcon/paginator/adapter/NativeArray.php @@ -4,21 +4,24 @@ /** * Phalcon\Paginator\Adapter\NativeArray + * * Pagination using a PHP array as source of data + * * * use Phalcon\Paginator\Adapter\NativeArray; + * * $paginator = new NativeArray( - * [ - * "data" => [ - * ["id" => 1, "name" => "Artichoke"], - * ["id" => 2, "name" => "Carrots"], - * ["id" => 3, "name" => "Beet"], - * ["id" => 4, "name" => "Lettuce"], - * ["id" => 5, "name" => ""], - * ], - * "limit" => 2, - * "page" => $currentPage, - * ] + * [ + * "data" => [ + * ["id" => 1, "name" => "Artichoke"], + * ["id" => 2, "name" => "Carrots"], + * ["id" => 3, "name" => "Beet"], + * ["id" => 4, "name" => "Lettuce"], + * ["id" => 5, "name" => ""], + * ], + * "limit" => 2, + * "page" => $currentPage, + * ] * ); * */ @@ -33,14 +36,14 @@ class NativeArray extends \Phalcon\Paginator\Adapter /** * Phalcon\Paginator\Adapter\NativeArray constructor * - * @param array $config + * @param array $config */ public function __construct(array $config) {} /** * Returns a slice of the resultset to show in the pagination * - * @return \stdClass + * @return \stdClass */ public function getPaginate() {} diff --git a/ide/stubs/Phalcon/paginator/adapter/QueryBuilder.php b/ide/stubs/Phalcon/paginator/adapter/QueryBuilder.php index fac5c0632..a7703cdc7 100644 --- a/ide/stubs/Phalcon/paginator/adapter/QueryBuilder.php +++ b/ide/stubs/Phalcon/paginator/adapter/QueryBuilder.php @@ -4,19 +4,23 @@ /** * Phalcon\Paginator\Adapter\QueryBuilder + * * Pagination using a PHQL query builder as source of data + * * * use Phalcon\Paginator\Adapter\QueryBuilder; + * * $builder = $this->modelsManager->createBuilder() - * ->columns("id, name") - * ->from("Robots") - * ->orderBy("name"); + * ->columns("id, name") + * ->from("Robots") + * ->orderBy("name"); + * * $paginator = new QueryBuilder( - * [ - * "builder" => $builder, - * "limit" => 20, - * "page" => 1, - * ] + * [ + * "builder" => $builder, + * "limit" => 20, + * "page" => 1, + * ] * ); * */ @@ -36,36 +40,36 @@ class QueryBuilder extends \Phalcon\Paginator\Adapter /** * Phalcon\Paginator\Adapter\QueryBuilder * - * @param array $config + * @param array $config */ public function __construct(array $config) {} /** * Get the current page number * - * @return int + * @return int */ public function getCurrentPage() {} /** * Set query builder object * - * @param mixed $builder - * @return QueryBuilder + * @param \Phalcon\Mvc\Model\Query\Builder $builder + * @return QueryBuilder */ public function setQueryBuilder(\Phalcon\Mvc\Model\Query\Builder $builder) {} /** * Get query builder object * - * @return \Phalcon\Mvc\Model\Query\Builder + * @return \Phalcon\Mvc\Model\Query\Builder */ public function getQueryBuilder() {} /** * Returns a slice of the resultset to show in the pagination * - * @return \stdClass + * @return \stdClass */ public function getPaginate() {} diff --git a/ide/stubs/Phalcon/queue/Beanstalk.php b/ide/stubs/Phalcon/queue/Beanstalk.php index 33f3b1894..2862dd39e 100644 --- a/ide/stubs/Phalcon/queue/Beanstalk.php +++ b/ide/stubs/Phalcon/queue/Beanstalk.php @@ -4,19 +4,23 @@ /** * Phalcon\Queue\Beanstalk + * * Class to access the beanstalk queue service. * Partially implements the protocol version 1.2 + * * * use Phalcon\Queue\Beanstalk; + * * $queue = new Beanstalk( - * [ - * "host" => "127.0.0.1", - * "port" => 11300, - * "persistent" => true, - * ] + * [ + * "host" => "127.0.0.1", + * "port" => 11300, + * "persistent" => true, + * ] * ); * * + * * @link http://www.igvita.com/2010/05/20/scalable-work-queues-with-beanstalk/ */ class Beanstalk @@ -25,6 +29,7 @@ class Beanstalk * Seconds to wait before putting the job in the ready queue. * The job will be in the "delayed" state during this time. * + * * @const integer */ const DEFAULT_DELAY = 0; @@ -33,6 +38,7 @@ class Beanstalk * Jobs with smaller priority values will be scheduled before jobs with larger priorities. * The most urgent priority is 0, the least urgent priority is 4294967295. * + * * @const integer */ const DEFAULT_PRIORITY = 100; @@ -41,6 +47,7 @@ class Beanstalk * Time to run - number of seconds to allow a worker to run this job. * The minimum ttr is 1. * + * * @const integer */ const DEFAULT_TTR = 86400; @@ -84,151 +91,151 @@ class Beanstalk /** * Phalcon\Queue\Beanstalk * - * @param array $parameters + * @param array $parameters */ public function __construct(array $parameters = array()) {} /** * Makes a connection to the Beanstalkd server * - * @return resource + * @return resource */ public function connect() {} /** * Puts a job on the queue using specified tube. * - * @param mixed $data - * @param array $options - * @return int|bool + * @param mixed $data + * @param array $options + * @return int|bool */ public function put($data, array $options = null) {} /** * Reserves/locks a ready job from the specified tube. * - * @param mixed $timeout - * @return bool|\Phalcon\Queue\Beanstalk\Job + * @param mixed $timeout + * @return bool|\Phalcon\Queue\Beanstalk\Job */ public function reserve($timeout = null) {} /** * Change the active tube. By default the tube is "default". * - * @param string $tube - * @return bool|string + * @param string $tube + * @return bool|string */ public function choose($tube) {} /** * The watch command adds the named tube to the watch list for the current connection. * - * @param string $tube - * @return bool|int + * @param string $tube + * @return bool|int */ public function watch($tube) {} /** * It removes the named tube from the watch list for the current connection. * - * @param string $tube - * @return bool|int + * @param string $tube + * @return bool|int */ public function ignore($tube) {} /** * Can delay any new job being reserved for a given time. * - * @param string $tube - * @param int $delay - * @return bool + * @param string $tube + * @param int $delay + * @return bool */ public function pauseTube($tube, $delay) {} /** * The kick command applies only to the currently used tube. * - * @param int $bound - * @return bool|int + * @param int $bound + * @return bool|int */ public function kick($bound) {} /** * Gives statistical information about the system as a whole. * - * @return bool|array + * @return bool|array */ public function stats() {} /** * Gives statistical information about the specified tube if it exists. * - * @param string $tube - * @return bool|array + * @param string $tube + * @return bool|array */ public function statsTube($tube) {} /** * Returns a list of all existing tubes. * - * @return bool|array + * @return bool|array */ public function listTubes() {} /** * Returns the tube currently being used by the client. * - * @return bool|string + * @return bool|string */ public function listTubeUsed() {} /** * Returns a list tubes currently being watched by the client. * - * @return bool|array + * @return bool|array */ public function listTubesWatched() {} /** * Inspect the next ready job. * - * @return bool|\Phalcon\Queue\Beanstalk\Job + * @return bool|\Phalcon\Queue\Beanstalk\Job */ public function peekReady() {} /** * Return the next job in the list of buried jobs. * - * @return bool|\Phalcon\Queue\Beanstalk\Job + * @return bool|\Phalcon\Queue\Beanstalk\Job */ public function peekBuried() {} /** * Return the next job in the list of buried jobs. * - * @return bool|\Phalcon\Queue\Beanstalk\Job + * @return bool|\Phalcon\Queue\Beanstalk\Job */ public function peekDelayed() {} /** * The peek commands let the client inspect a job in the system. * - * @param int $id - * @return bool|\Phalcon\Queue\Beanstalk\Job + * @param int $id + * @return bool|\Phalcon\Queue\Beanstalk\Job */ public function jobPeek($id) {} /** * Reads the latest status from the Beanstalkd server * - * @return array + * @return array */ final public function readStatus() {} /** * Fetch a YAML payload from the Beanstalkd server * - * @return array + * @return array */ final public function readYaml() {} @@ -236,30 +243,30 @@ final public function readYaml() {} * Reads a packet from the socket. Prior to reading from the socket will * check for availability of the connection. * - * @param int $length - * @return bool|string + * @param int $length + * @return bool|string */ public function read($length = 0) {} /** * Writes data to the socket. Performs a connection if none is available * - * @param string $data - * @return bool|int + * @param string $data + * @return bool|int */ protected function write($data) {} /** * Closes the connection to the beanstalk server. * - * @return bool + * @return bool */ public function disconnect() {} /** * Simply closes the connection. * - * @return bool + * @return bool */ public function quit() {} diff --git a/ide/stubs/Phalcon/queue/beanstalk/Exception.php b/ide/stubs/Phalcon/queue/beanstalk/Exception.php index 6ef1f68f2..e2bb63bcd 100644 --- a/ide/stubs/Phalcon/queue/beanstalk/Exception.php +++ b/ide/stubs/Phalcon/queue/beanstalk/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Queue\Beanstalk\Exception + * * Exceptions thrown in Phalcon\Queue\Beanstalk will use this class */ class Exception extends \Phalcon\Exception diff --git a/ide/stubs/Phalcon/queue/beanstalk/Job.php b/ide/stubs/Phalcon/queue/beanstalk/Job.php index 0475eaa81..6a55f9606 100644 --- a/ide/stubs/Phalcon/queue/beanstalk/Job.php +++ b/ide/stubs/Phalcon/queue/beanstalk/Job.php @@ -4,6 +4,7 @@ /** * Phalcon\Queue\Beanstalk\Job + * * Represents a job in a beanstalk queue */ class Job @@ -23,28 +24,28 @@ class Job /** - * @return string + * @return string */ public function getId() {} /** - * @return mixed + * @return mixed */ public function getBody() {} /** * Phalcon\Queue\Beanstalk\Job * - * @param mixed $queue - * @param string $id - * @param mixed $body + * @param \Phalcon\Queue\Beanstalk $queue + * @param string $id + * @param mixed $body */ public function __construct(\Phalcon\Queue\Beanstalk $queue, $id, $body) {} /** * Removes a job from the server entirely * - * @return bool + * @return bool */ public function delete() {} @@ -53,9 +54,9 @@ public function delete() {} * its state as "ready") to be run by any client. It is normally used when the job * fails because of a transitory error. * - * @param int $priority - * @param int $delay - * @return bool + * @param int $priority + * @param int $delay + * @return bool */ public function release($priority = 100, $delay = 0) {} @@ -64,8 +65,8 @@ public function release($priority = 100, $delay = 0) {} * a FIFO linked list and will not be touched by the server again until a client * kicks them with the "kick" command. * - * @param int $priority - * @return bool + * @param int $priority + * @return bool */ public function bury($priority = 100) {} @@ -77,21 +78,21 @@ public function bury($priority = 100) {} * a job (e.g. it may do this on `DEADLINE_SOON`). The command postpones the auto * release of a reserved job until TTR seconds from when the command is issued. * - * @return bool + * @return bool */ public function touch() {} /** * Move the job to the ready queue if it is delayed or buried. * - * @return bool + * @return bool */ public function kick() {} /** * Gives statistical information about the specified job if it exists. * - * @return bool|array + * @return bool|array */ public function stats() {} diff --git a/ide/stubs/Phalcon/security/Exception.php b/ide/stubs/Phalcon/security/Exception.php index c96461cac..c13eabd7d 100644 --- a/ide/stubs/Phalcon/security/Exception.php +++ b/ide/stubs/Phalcon/security/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Security\Exception + * * Exceptions thrown in Phalcon\Security will use this class */ class Exception extends \Phalcon\Exception diff --git a/ide/stubs/Phalcon/security/Random.php b/ide/stubs/Phalcon/security/Random.php index ec6454af5..4312ee185 100644 --- a/ide/stubs/Phalcon/security/Random.php +++ b/ide/stubs/Phalcon/security/Random.php @@ -4,56 +4,72 @@ /** * Phalcon\Security\Random + * * Secure random number generator class. + * * Provides secure random number generator which is suitable for generating * session key in HTTP cookies, etc. + * * It supports following secure random number generators: + * * - random_bytes (PHP 7) * - libsodium * - openssl, libressl * - /dev/urandom + * * `Phalcon\Security\Random` could be mainly useful for: + * * - Key generation (e.g. generation of complicated keys) * - Generating random passwords for new user accounts * - Encryption systems + * * * $random = new \Phalcon\Security\Random(); + * * // Random binary string * $bytes = $random->bytes(); + * * // Random hex string * echo $random->hex(10); // a29f470508d5ccb8e289 * echo $random->hex(10); // 533c2f08d5eee750e64a * echo $random->hex(11); // f362ef96cb9ffef150c9cd * echo $random->hex(12); // 95469d667475125208be45c4 * echo $random->hex(13); // 05475e8af4a34f8f743ab48761 + * * // Random base64 string * echo $random->base64(12); // XfIN81jGGuKkcE1E * echo $random->base64(12); // 3rcq39QzGK9fUqh8 * echo $random->base64(); // DRcfbngL/iOo9hGGvy1TcQ== * echo $random->base64(16); // SvdhPcIHDZFad838Bb0Swg== + * * // Random URL-safe base64 string * echo $random->base64Safe(); // PcV6jGbJ6vfVw7hfKIFDGA * echo $random->base64Safe(); // GD8JojhzSTrqX7Q8J6uug * echo $random->base64Safe(8); // mGyy0evy3ok * echo $random->base64Safe(null, true); // DRrAgOFkS4rvRiVHFefcQ== + * * // Random UUID * echo $random->uuid(); // db082997-2572-4e2c-a046-5eefe97b1235 * echo $random->uuid(); // da2aa0e2-b4d0-4e3c-99f5-f5ef62c57fe2 * echo $random->uuid(); // 75e6b628-c562-4117-bb76-61c4153455a9 * echo $random->uuid(); // dc446df1-0848-4d05-b501-4af3c220c13d + * * // Random number between 0 and $len * echo $random->number(256); // 84 * echo $random->number(256); // 79 * echo $random->number(100); // 29 * echo $random->number(300); // 40 + * * // Random base58 string * echo $random->base58(); // 4kUgL2pdQMSCQtjE * echo $random->base58(); // Umjxqf7ZPwh765yR * echo $random->base58(24); // qoXcgmw4A9dys26HaNEdCRj9 * echo $random->base58(7); // 774SJD3vgP * + * * This class partially borrows SecureRandom library from Ruby * + * * @link http://ruby-doc.org/stdlib-2.2.2/libdoc/securerandom/rdoc/SecureRandom.html */ class Random @@ -61,122 +77,153 @@ class Random /** * Generates a random binary string + * * The `Random::bytes` method returns a string and accepts as input an int * representing the length in bytes to be returned. + * * If $len is not specified, 16 is assumed. It may be larger in future. * The result may contain any byte: "x00" - "xFF". + * * * $random = new \Phalcon\Security\Random(); + * * $bytes = $random->bytes(); * var_dump(bin2hex($bytes)); * // Possible output: string(32) "00f6c04b144b41fad6a59111c126e1ee" * * + * * @throws Exception If secure random number generator is not available or unexpected partial read - * @param int $len - * @return string + * @param int $len + * @return string */ public function bytes($len = 16) {} /** * Generates a random hex string + * * If $len is not specified, 16 is assumed. It may be larger in future. * The length of the result string is usually greater of $len. + * * * $random = new \Phalcon\Security\Random(); + * * echo $random->hex(10); // a29f470508d5ccb8e289 * * + * * @throws Exception If secure random number generator is not available or unexpected partial read - * @param int $len - * @return string + * @param int $len + * @return string */ public function hex($len = null) {} /** * Generates a random base58 string + * * If $len is not specified, 16 is assumed. It may be larger in future. * The result may contain alphanumeric characters except 0, O, I and l. + * * It is similar to Base64 but has been modified to avoid both non-alphanumeric * characters and letters which might look ambiguous when printed. + * * * $random = new \Phalcon\Security\Random(); + * * echo $random->base58(); // 4kUgL2pdQMSCQtjE * * + * * @link https://en.wikipedia.org/wiki/Base58 * @throws Exception If secure random number generator is not available or unexpected partial read - * @param mixed $n - * @return string + * @param mixed $n + * @return string */ public function base58($n = null) {} /** * Generates a random base64 string + * * If $len is not specified, 16 is assumed. It may be larger in future. * The length of the result string is usually greater of $len. - * Size formula: 4 *( $len / 3) and this need to be rounded up to a multiple of 4. + * Size formula: 4( $len / 3) and this need to be rounded up to a multiple of 4. + * * * $random = new \Phalcon\Security\Random(); + * * echo $random->base64(12); // 3rcq39QzGK9fUqh8 * * + * * @throws Exception If secure random number generator is not available or unexpected partial read - * @param int $len - * @return string + * @param int $len + * @return string */ public function base64($len = null) {} /** * Generates a random URL-safe base64 string + * * If $len is not specified, 16 is assumed. It may be larger in future. * The length of the result string is usually greater of $len. + * * By default, padding is not generated because "=" may be used as a URL delimiter. * The result may contain A-Z, a-z, 0-9, "-" and "_". "=" is also used if $padding is true. * See RFC 3548 for the definition of URL-safe base64. + * * * $random = new \Phalcon\Security\Random(); + * * echo $random->base64Safe(); // GD8JojhzSTrqX7Q8J6uug * * + * * @link https://www.ietf.org/rfc/rfc3548.txt * @throws Exception If secure random number generator is not available or unexpected partial read - * @param int $len - * @param bool $padding - * @return string + * @param int $len + * @param bool $padding + * @return string */ public function base64Safe($len = null, $padding = false) {} /** * Generates a v4 random UUID (Universally Unique IDentifier) + * * The version 4 UUID is purely random (except the version). It doesn't contain meaningful * information such as MAC address, time, etc. See RFC 4122 for details of UUID. + * * This algorithm sets the version number (4 bits) as well as two reserved bits. * All other bits (the remaining 122 bits) are set using a random or pseudorandom data source. * Version 4 UUIDs have the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx where x is any hexadecimal * digit and y is one of 8, 9, A, or B (e.g., f47ac10b-58cc-4372-a567-0e02b2c3d479). + * * * $random = new \Phalcon\Security\Random(); + * * echo $random->uuid(); // 1378c906-64bb-4f81-a8d6-4ae1bfcdec22 * * + * * @link https://www.ietf.org/rfc/rfc4122.txt * @throws Exception If secure random number generator is not available or unexpected partial read - * @return string + * @return string */ public function uuid() {} /** * Generates a random number between 0 and $len + * * Returns an integer: 0 <= result <= $len. + * * * $random = new \Phalcon\Security\Random(); + * * echo $random->number(16); // 8 * * * @throws Exception If secure random number generator is not available, unexpected partial read or $len <= 0 - * @param int $len - * @return int + * @param int $len + * @return int */ public function number($len) {} diff --git a/ide/stubs/Phalcon/session/Adapter.php b/ide/stubs/Phalcon/session/Adapter.php index c9bdc9a59..ef61f11c4 100644 --- a/ide/stubs/Phalcon/session/Adapter.php +++ b/ide/stubs/Phalcon/session/Adapter.php @@ -4,6 +4,7 @@ /** * Phalcon\Session\Adapter + * * Base class for Phalcon\Session adapters */ abstract class Adapter implements \Phalcon\Session\AdapterInterface @@ -30,198 +31,211 @@ abstract class Adapter implements \Phalcon\Session\AdapterInterface /** * Phalcon\Session\Adapter constructor * - * @param array $options + * + * @param array $options */ public function __construct($options = null) {} /** * Starts the session (if headers are already sent the session will not be started) * - * @return bool + * @return bool */ public function start() {} /** * Sets session's options + * * * $session->setOptions( - * [ - * "uniqueId" => "my-private-app", - * ] + * [ + * "uniqueId" => "my-private-app", + * ] * ); * * - * @param array $options + * @param array $options */ public function setOptions(array $options) {} /** * Get internal options * - * @return array + * @return array */ public function getOptions() {} /** * Set session name * - * @param string $name + * @param string $name */ public function setName($name) {} /** * Get session name * - * @return string + * @return string */ public function getName() {} /** * {@inheritdoc} * - * @param bool $deleteOldSession - * @return Adapter + * @param bool $deleteOldSession + * @return Adapter */ public function regenerateId($deleteOldSession = true) {} /** * Gets a session variable from an application context + * * * $session->get("auth", "yes"); * * - * @param string $index - * @param mixed $defaultValue - * @param bool $remove - * @return mixed + * @param string $index + * @param mixed $defaultValue + * @param bool $remove + * @return mixed */ public function get($index, $defaultValue = null, $remove = false) {} /** * Sets a session variable in an application context + * * * $session->set("auth", "yes"); * * - * @param string $index - * @param mixed $value + * @param string $index + * @param mixed $value */ public function set($index, $value) {} /** * Check whether a session variable is set in an application context + * * * var_dump( - * $session->has("auth") + * $session->has("auth") * ); * * - * @param string $index - * @return bool + * @param string $index + * @return bool */ public function has($index) {} /** * Removes a session variable from an application context + * * * $session->remove("auth"); * * - * @param string $index + * @param string $index */ public function remove($index) {} /** * Returns active session id + * * * echo $session->getId(); * * - * @return string + * @return string */ public function getId() {} /** * Set the current session id + * * * $session->setId($id); * * - * @param string $id + * @param string $id */ public function setId($id) {} /** * Check whether the session has been started + * * * var_dump( - * $session->isStarted() + * $session->isStarted() * ); * * - * @return bool + * @return bool */ public function isStarted() {} /** * Destroys the active session + * * * var_dump( - * $session->destroy() + * $session->destroy() * ); + * * var_dump( - * $session->destroy(true) + * $session->destroy(true) * ); * * - * @param bool $removeData - * @return bool + * @param bool $removeData + * @return bool */ public function destroy($removeData = false) {} /** * Returns the status of the current session. + * * * var_dump( - * $session->status() + * $session->status() * ); + * * if ($session->status() !== $session::SESSION_ACTIVE) { - * $session->start(); + * $session->start(); * } * * - * @return int + * @return int */ public function status() {} /** * Alias: Gets a session variable from an application context * - * @param string $index - * @return mixed + * @param string $index + * @return mixed */ public function __get($index) {} /** * Alias: Sets a session variable in an application context * - * @param string $index - * @param mixed $value + * @param string $index + * @param mixed $value */ public function __set($index, $value) {} /** * Alias: Check whether a session variable is set in an application context * - * @param string $index - * @return bool + * @param string $index + * @return bool */ public function __isset($index) {} /** * Alias: Removes a session variable from an application context * - * @param string $index + * @param string $index */ public function __unset($index) {} diff --git a/ide/stubs/Phalcon/session/AdapterInterface.php b/ide/stubs/Phalcon/session/AdapterInterface.php index a91a248e0..a76ecd6e4 100644 --- a/ide/stubs/Phalcon/session/AdapterInterface.php +++ b/ide/stubs/Phalcon/session/AdapterInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Session\AdapterInterface + * * Interface for Phalcon\Session adapters */ interface AdapterInterface @@ -17,90 +18,90 @@ public function start(); /** * Sets session options * - * @param array $options + * @param array $options */ public function setOptions(array $options); /** * Get internal options * - * @return array + * @return array */ public function getOptions(); /** * Gets a session variable from an application context * - * @param string $index - * @param mixed $defaultValue - * @return mixed + * @param string $index + * @param mixed $defaultValue + * @return mixed */ public function get($index, $defaultValue = null); /** * Sets a session variable in an application context * - * @param string $index - * @param mixed $value + * @param string $index + * @param mixed $value */ public function set($index, $value); /** * Check whether a session variable is set in an application context * - * @param string $index - * @return bool + * @param string $index + * @return bool */ public function has($index); /** * Removes a session variable from an application context * - * @param string $index + * @param string $index */ public function remove($index); /** * Returns active session id * - * @return string + * @return string */ public function getId(); /** * Check whether the session has been started * - * @return bool + * @return bool */ public function isStarted(); /** * Destroys the active session * - * @param bool $removeData - * @return bool + * @param bool $removeData + * @return bool */ public function destroy($removeData = false); /** * Regenerate session's id * - * @param bool $deleteOldSession - * @return AdapterInterface + * @param bool $deleteOldSession + * @return AdapterInterface */ public function regenerateId($deleteOldSession = true); /** * Set session name * - * @param string $name + * @param string $name */ public function setName($name); /** * Get session name * - * @return string + * @return string */ public function getName(); diff --git a/ide/stubs/Phalcon/session/Bag.php b/ide/stubs/Phalcon/session/Bag.php index 0e730e5c3..4dedfa4bc 100644 --- a/ide/stubs/Phalcon/session/Bag.php +++ b/ide/stubs/Phalcon/session/Bag.php @@ -4,10 +4,13 @@ /** * Phalcon\Session\Bag + * * This component helps to separate session data into "namespaces". Working by this way * you can easily create groups of session variables into the application + * * * $user = new \Phalcon\Session\Bag("user"); + * * $user->name = "Kimbra Johnson"; * $user->age = 22; * @@ -33,21 +36,21 @@ class Bag implements \Phalcon\Di\InjectionAwareInterface, \Phalcon\Session\BagIn /** * Phalcon\Session\Bag constructor * - * @param string $name + * @param string $name */ public function __construct($name) {} /** * Sets the DependencyInjector container * - * @param mixed $dependencyInjector + * @param \Phalcon\DiInterface $dependencyInjector */ public function setDI(\Phalcon\DiInterface $dependencyInjector) {} /** * Returns the DependencyInjector container * - * @return \Phalcon\DiInterface + * @return \Phalcon\DiInterface */ public function getDI() {} @@ -59,6 +62,7 @@ public function initialize() {} /** * Destroys the session bag + * * * $user->destroy(); * @@ -67,133 +71,142 @@ public function destroy() {} /** * Sets a value in the session bag + * * * $user->set("name", "Kimbra"); * * - * @param string $property - * @param mixed $value + * @param string $property + * @param mixed $value */ public function set($property, $value) {} /** * Magic setter to assign values to the session bag + * * * $user->name = "Kimbra"; * * - * @param string $property - * @param mixed $value + * @param string $property + * @param mixed $value */ public function __set($property, $value) {} /** * Obtains a value from the session bag optionally setting a default value + * * * echo $user->get("name", "Kimbra"); * * - * @param string $property - * @param mixed $defaultValue + * @param string $property + * @param mixed $defaultValue */ public function get($property, $defaultValue = null) {} /** * Magic getter to obtain values from the session bag + * * * echo $user->name; * * - * @param string $property - * @return mixed + * @param string $property + * @return mixed */ public function __get($property) {} /** * Check whether a property is defined in the internal bag + * * * var_dump( - * $user->has("name") + * $user->has("name") * ); * * - * @param string $property - * @return bool + * @param string $property + * @return bool */ public function has($property) {} /** * Magic isset to check whether a property is defined in the bag + * * * var_dump( - * isset($user["name"]) + * isset($user["name"]) * ); * * - * @param string $property - * @return bool + * @param string $property + * @return bool */ public function __isset($property) {} /** * Removes a property from the internal bag + * * * $user->remove("name"); * * - * @param string $property - * @return bool + * @param string $property + * @return bool */ public function remove($property) {} /** * Magic unset to remove items using the array syntax + * * * unset($user["name"]); * * - * @param string $property - * @return bool + * @param string $property + * @return bool */ public function __unset($property) {} /** * Return length of bag + * * * echo $user->count(); * * - * @return int + * @return int */ public final function count() {} /** *  Returns the bag iterator * - * @return \ArrayIterator + * @return \ArrayIterator */ public final function getIterator() {} /** - * @param string $property - * @param mixed $value + * @param string $property + * @param mixed $value */ public final function offsetSet($property, $value) {} /** - * @param string $property - * @return bool + * @param string $property + * @return bool */ public final function offsetExists($property) {} /** - * @param string $property + * @param string $property */ public final function offsetUnset($property) {} /** - * @param string $property - * @return mixed + * @param string $property + * @return mixed */ public final function offsetGet($property) {} diff --git a/ide/stubs/Phalcon/session/BagInterface.php b/ide/stubs/Phalcon/session/BagInterface.php index 7d7e1780b..ed3afba46 100644 --- a/ide/stubs/Phalcon/session/BagInterface.php +++ b/ide/stubs/Phalcon/session/BagInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Session\BagInterface + * * Interface for Phalcon\Session\Bag */ interface BagInterface @@ -23,49 +24,49 @@ public function destroy(); /** * Setter of values * - * @param string $property - * @param mixed $value + * @param string $property + * @param mixed $value */ public function set($property, $value); /** * Getter of values * - * @param string $property - * @param mixed $defaultValue - * @return mixed + * @param string $property + * @param mixed $defaultValue + * @return mixed */ public function get($property, $defaultValue = null); /** * Isset property * - * @param string $property - * @return bool + * @param string $property + * @return bool */ public function has($property); /** * Setter of values * - * @param string $property - * @param mixed $value + * @param string $property + * @param mixed $value */ public function __set($property, $value); /** * Getter of values * - * @param string $property - * @return mixed + * @param string $property + * @return mixed */ public function __get($property); /** * Isset property * - * @param string $property - * @return bool + * @param string $property + * @return bool */ public function __isset($property); diff --git a/ide/stubs/Phalcon/session/Exception.php b/ide/stubs/Phalcon/session/Exception.php index f792f34ce..3bff6887c 100644 --- a/ide/stubs/Phalcon/session/Exception.php +++ b/ide/stubs/Phalcon/session/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Session\Exception + * * Exceptions thrown in Phalcon\Session will use this class */ class Exception extends \Phalcon\Exception diff --git a/ide/stubs/Phalcon/session/adapter/Files.php b/ide/stubs/Phalcon/session/adapter/Files.php index f8c322135..ffe3b7f0e 100644 --- a/ide/stubs/Phalcon/session/adapter/Files.php +++ b/ide/stubs/Phalcon/session/adapter/Files.php @@ -4,16 +4,22 @@ /** * Phalcon\Session\Adapter\Files + * * This adapter store sessions in plain files + * * * use Phalcon\Session\Adapter\Files; + * * $session = new Files( - * [ - * "uniqueId" => "my-private-app", - * ] + * [ + * "uniqueId" => "my-private-app", + * ] * ); + * * $session->start(); + * * $session->set("var", "some-value"); + * * echo $session->get("var"); * */ diff --git a/ide/stubs/Phalcon/session/adapter/Libmemcached.php b/ide/stubs/Phalcon/session/adapter/Libmemcached.php index eacd1ed57..6abab1880 100644 --- a/ide/stubs/Phalcon/session/adapter/Libmemcached.php +++ b/ide/stubs/Phalcon/session/adapter/Libmemcached.php @@ -4,28 +4,34 @@ /** * Phalcon\Session\Adapter\Libmemcached + * * This adapter store sessions in libmemcached + * * * use Phalcon\Session\Adapter\Libmemcached; + * * $session = new Libmemcached( - * [ - * "servers" => [ - * [ - * "host" => "localhost", - * "port" => 11211, - * "weight" => 1, - * ], - * ], - * "client" => [ - * \Memcached::OPT_HASH => \Memcached::HASH_MD5, - * \Memcached::OPT_PREFIX_KEY => "prefix.", - * ], - * "lifetime" => 3600, - * "prefix" => "my_", - * ] + * [ + * "servers" => [ + * [ + * "host" => "localhost", + * "port" => 11211, + * "weight" => 1, + * ], + * ], + * "client" => [ + * \Memcached::OPT_HASH => \Memcached::HASH_MD5, + * \Memcached::OPT_PREFIX_KEY => "prefix.", + * ], + * "lifetime" => 3600, + * "prefix" => "my_", + * ] * ); + * * $session->start(); + * * $session->set("var", "some-value"); + * * echo $session->get("var"); * */ @@ -47,50 +53,51 @@ public function getLifetime() {} /** * Phalcon\Session\Adapter\Libmemcached constructor * + * * @throws \Phalcon\Session\Exception - * @param array $options + * @param array $options */ public function __construct(array $options) {} /** - * @return bool + * @return bool */ public function open() {} /** - * @return bool + * @return bool */ public function close() {} /** * {@inheritdoc} * - * @param string $sessionId - * @return string + * @param string $sessionId + * @return string */ public function read($sessionId) {} /** * {@inheritdoc} * - * @param string $sessionId - * @param string $data - * @return bool + * @param string $sessionId + * @param string $data + * @return bool */ public function write($sessionId, $data) {} /** * {@inheritdoc} * - * @param string $sessionId - * @return bool + * @param string $sessionId + * @return bool */ public function destroy($sessionId = null) {} /** * {@inheritdoc} * - * @return bool + * @return bool */ public function gc() {} diff --git a/ide/stubs/Phalcon/session/adapter/Memcache.php b/ide/stubs/Phalcon/session/adapter/Memcache.php index 0e9995a58..dab1fcb7b 100644 --- a/ide/stubs/Phalcon/session/adapter/Memcache.php +++ b/ide/stubs/Phalcon/session/adapter/Memcache.php @@ -4,21 +4,27 @@ /** * Phalcon\Session\Adapter\Memcache + * * This adapter store sessions in memcache + * * * use Phalcon\Session\Adapter\Memcache; + * * $session = new Memcache( - * [ - * "uniqueId" => "my-private-app", - * "host" => "127.0.0.1", - * "port" => 11211, - * "persistent" => true, - * "lifetime" => 3600, - * "prefix" => "my_", - * ] + * [ + * "uniqueId" => "my-private-app", + * "host" => "127.0.0.1", + * "port" => 11211, + * "persistent" => true, + * "lifetime" => 3600, + * "prefix" => "my_", + * ] * ); + * * $session->start(); + * * $session->set("var", "some-value"); + * * echo $session->get("var"); * */ @@ -40,49 +46,49 @@ public function getLifetime() {} /** * Phalcon\Session\Adapter\Memcache constructor * - * @param array $options + * @param array $options */ public function __construct(array $options = array()) {} /** - * @return bool + * @return bool */ public function open() {} /** - * @return bool + * @return bool */ public function close() {} /** * {@inheritdoc} * - * @param string $sessionId - * @return string + * @param string $sessionId + * @return string */ public function read($sessionId) {} /** * {@inheritdoc} * - * @param string $sessionId - * @param string $data - * @return bool + * @param string $sessionId + * @param string $data + * @return bool */ public function write($sessionId, $data) {} /** * {@inheritdoc} * - * @param string $sessionId - * @return bool + * @param string $sessionId + * @return bool */ public function destroy($sessionId = null) {} /** * {@inheritdoc} * - * @return bool + * @return bool */ public function gc() {} diff --git a/ide/stubs/Phalcon/session/adapter/Redis.php b/ide/stubs/Phalcon/session/adapter/Redis.php index b677d32d6..26e847a84 100644 --- a/ide/stubs/Phalcon/session/adapter/Redis.php +++ b/ide/stubs/Phalcon/session/adapter/Redis.php @@ -4,23 +4,29 @@ /** * Phalcon\Session\Adapter\Redis + * * This adapter store sessions in Redis + * * * use Phalcon\Session\Adapter\Redis; + * * $session = new Redis( - * [ - * "uniqueId" => "my-private-app", - * "host" => "localhost", - * "port" => 6379, - * "auth" => "foobared", - * "persistent" => false, - * "lifetime" => 3600, - * "prefix" => "my", - * "index" => 1, - * ] + * [ + * "uniqueId" => "my-private-app", + * "host" => "localhost", + * "port" => 6379, + * "auth" => "foobared", + * "persistent" => false, + * "lifetime" => 3600, + * "prefix" => "my", + * "index" => 1, + * ] * ); + * * $session->start(); + * * $session->set("var", "some-value"); + * * echo $session->get("var"); * */ @@ -42,53 +48,53 @@ public function getLifetime() {} /** * Phalcon\Session\Adapter\Redis constructor * - * @param array $options + * @param array $options */ public function __construct(array $options = array()) {} /** * {@inheritdoc} * - * @return bool + * @return bool */ public function open() {} /** * {@inheritdoc} * - * @return bool + * @return bool */ public function close() {} /** * {@inheritdoc} * - * @param mixed $sessionId - * @return string + * @param mixed $sessionId + * @return string */ public function read($sessionId) {} /** * {@inheritdoc} * - * @param string $sessionId - * @param string $data - * @return bool + * @param string $sessionId + * @param string $data + * @return bool */ public function write($sessionId, $data) {} /** * {@inheritdoc} * - * @param string $sessionId - * @return bool + * @param string $sessionId + * @return bool */ public function destroy($sessionId = null) {} /** * {@inheritdoc} * - * @return bool + * @return bool */ public function gc() {} diff --git a/ide/stubs/Phalcon/tag/Exception.php b/ide/stubs/Phalcon/tag/Exception.php index 8d2604755..7ce0fc619 100644 --- a/ide/stubs/Phalcon/tag/Exception.php +++ b/ide/stubs/Phalcon/tag/Exception.php @@ -4,7 +4,9 @@ /** * Phalcon\Tag\Exception + * * Exceptions thrown in Phalcon\Tag will use this class + * */ class Exception extends \Phalcon\Exception { diff --git a/ide/stubs/Phalcon/tag/Select.php b/ide/stubs/Phalcon/tag/Select.php index 2379d1991..b44474154 100644 --- a/ide/stubs/Phalcon/tag/Select.php +++ b/ide/stubs/Phalcon/tag/Select.php @@ -4,6 +4,7 @@ /** * Phalcon\Tag\Select + * * Generates a SELECT html tag using a static array of values or a Phalcon\Mvc\Model resultset */ abstract class Select @@ -12,27 +13,30 @@ abstract class Select /** * Generates a SELECT tag * - * @param array $parameters - * @param array $data + * + * @param array $parameters + * @param array $data */ public static function selectField($parameters, $data = null) {} /** * Generate the OPTION tags based on a resultset * - * @param \Phalcon\Mvc\Model\Resultset $resultset - * @param array $using - * @param mixed $value - * @param string $closeOption + * + * @param \Phalcon\Mvc\Model\Resultset $resultset + * @param array $using + * @param mixed $value + * @param string $closeOption */ private static function _optionsFromResultset($resultset, $using, $value, $closeOption) {} /** * Generate the OPTION tags based on an array * - * @param array $data - * @param mixed $value - * @param string $closeOption + * + * @param array $data + * @param mixed $value + * @param string $closeOption */ private static function _optionsFromArray($data, $value, $closeOption) {} diff --git a/ide/stubs/Phalcon/translate/Adapter.php b/ide/stubs/Phalcon/translate/Adapter.php index 87302b916..349f881fc 100644 --- a/ide/stubs/Phalcon/translate/Adapter.php +++ b/ide/stubs/Phalcon/translate/Adapter.php @@ -4,6 +4,7 @@ /** * Phalcon\Translate\Adapter + * * Base class for Phalcon\Translate adapters */ abstract class Adapter implements \Phalcon\Translate\AdapterInterface @@ -15,71 +16,76 @@ abstract class Adapter implements \Phalcon\Translate\AdapterInterface /** - * @param array $options + * @param array $options */ public function __construct(array $options) {} /** - * @param mixed $interpolator - * @return Adapter + * @param \Phalcon\Translate\InterpolatorInterface $interpolator + * @return Adapter */ public function setInterpolator(\Phalcon\Translate\InterpolatorInterface $interpolator) {} /** * Returns the translation string of the given key * - * @param string $translateKey - * @param array $placeholders - * @return string + * + * @param string $translateKey + * @param array $placeholders + * @return string */ public function t($translateKey, $placeholders = null) {} /** * Returns the translation string of the given key (alias of method 't') * - * @param string $translateKey - * @param array $placeholders - * @return string + * + * @param string $translateKey + * @param array $placeholders + * @return string */ public function _($translateKey, $placeholders = null) {} /** * Sets a translation value * - * @param string $offset - * @param string $value + * + * @param string $offset + * @param string $value */ public function offsetSet($offset, $value) {} /** * Check whether a translation key exists * - * @param string $translateKey - * @return bool + * @param string $translateKey + * @return bool */ public function offsetExists($translateKey) {} /** * Unsets a translation from the dictionary * - * @param string $offset + * + * @param string $offset */ public function offsetUnset($offset) {} /** * Returns the translation related to the given key * - * @param string $translateKey - * @return string + * + * @param string $translateKey + * @return string */ public function offsetGet($translateKey) {} /** * Replaces placeholders by the values passed * - * @param string $translation - * @param mixed $placeholders - * @return string + * @param string $translation + * @param mixed $placeholders + * @return string */ protected function replacePlaceholders($translation, $placeholders = null) {} diff --git a/ide/stubs/Phalcon/translate/AdapterInterface.php b/ide/stubs/Phalcon/translate/AdapterInterface.php index 268f67aa9..638d1e0c8 100644 --- a/ide/stubs/Phalcon/translate/AdapterInterface.php +++ b/ide/stubs/Phalcon/translate/AdapterInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Translate\AdapterInterface + * * Interface for Phalcon\Translate adapters */ interface AdapterInterface @@ -12,32 +13,34 @@ interface AdapterInterface /** * Returns the translation string of the given key * + * * @param string translateKey * @param array placeholders * @return string - * @param string $translateKey - * @param mixed $placeholders - * @return string + * @param string $translateKey + * @param mixed $placeholders + * @return string */ public function t($translateKey, $placeholders = null); /** * Returns the translation related to the given key * + * * @param string index * @param array placeholders * @return string - * @param string $index - * @param mixed $placeholders - * @return string + * @param string $index + * @param mixed $placeholders + * @return string */ public function query($index, $placeholders = null); /** * Check whether is defined a translation key in the internal array * - * @param string $index - * @return bool + * @param string $index + * @return bool */ public function exists($index); diff --git a/ide/stubs/Phalcon/translate/Exception.php b/ide/stubs/Phalcon/translate/Exception.php index 5bef02e3d..5e18d0a12 100644 --- a/ide/stubs/Phalcon/translate/Exception.php +++ b/ide/stubs/Phalcon/translate/Exception.php @@ -4,6 +4,7 @@ /** * Phalcon\Translate\Exception + * * Class for exceptions thrown by Phalcon\Translate */ class Exception extends \Phalcon\Exception diff --git a/ide/stubs/Phalcon/translate/InterpolatorInterface.php b/ide/stubs/Phalcon/translate/InterpolatorInterface.php index ed969dc8e..ebd379662 100644 --- a/ide/stubs/Phalcon/translate/InterpolatorInterface.php +++ b/ide/stubs/Phalcon/translate/InterpolatorInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Translate\AdapterInterface + * * Interface for Phalcon\Translate adapters */ interface InterpolatorInterface @@ -12,9 +13,9 @@ interface InterpolatorInterface /** * Replaces placeholders by the values passed * - * @param string $translation - * @param mixed $placeholders - * @return string + * @param string $translation + * @param mixed $placeholders + * @return string */ public function replacePlaceholders($translation, $placeholders = null); diff --git a/ide/stubs/Phalcon/translate/adapter/Csv.php b/ide/stubs/Phalcon/translate/adapter/Csv.php index 37b41f034..24cce66a5 100644 --- a/ide/stubs/Phalcon/translate/adapter/Csv.php +++ b/ide/stubs/Phalcon/translate/adapter/Csv.php @@ -4,6 +4,7 @@ /** * Phalcon\Translate\Adapter\Csv + * * Allows to define translation lists using CSV file */ class Csv extends \Phalcon\Translate\Adapter implements \ArrayAccess @@ -15,34 +16,35 @@ class Csv extends \Phalcon\Translate\Adapter implements \ArrayAccess /** * Phalcon\Translate\Adapter\Csv constructor * - * @param array $options + * @param array $options */ public function __construct(array $options) {} /** * Load translates from file * - * @param string $file - * @param int $length - * @param string $delimiter - * @param string $enclosure + * + * @param string $file + * @param int $length + * @param string $delimiter + * @param string $enclosure */ private function _load($file, $length, $delimiter, $enclosure) {} /** * Returns the translation related to the given key * - * @param string $index - * @param mixed $placeholders - * @return string + * @param string $index + * @param mixed $placeholders + * @return string */ public function query($index, $placeholders = null) {} /** * Check whether is defined a translation key in the internal array * - * @param string $index - * @return bool + * @param string $index + * @return bool */ public function exists($index) {} diff --git a/ide/stubs/Phalcon/translate/adapter/Gettext.php b/ide/stubs/Phalcon/translate/adapter/Gettext.php index 7a456d5e2..3570db5d6 100644 --- a/ide/stubs/Phalcon/translate/adapter/Gettext.php +++ b/ide/stubs/Phalcon/translate/adapter/Gettext.php @@ -4,17 +4,20 @@ /** * Phalcon\Translate\Adapter\Gettext + * * * use Phalcon\Translate\Adapter\Gettext; + * * $adapter = new Gettext( - * [ - * "locale" => "de_DE.UTF-8", - * "defaultDomain" => "translations", - * "directory" => "/path/to/application/locales", - * "category" => LC_MESSAGES, - * ] + * [ + * "locale" => "de_DE.UTF-8", + * "defaultDomain" => "translations", + * "directory" => "/path/to/application/locales", + * "category" => LC_MESSAGES, + * ] * ); * + * * Allows translate using gettext */ class Gettext extends \Phalcon\Translate\Adapter implements \ArrayAccess @@ -41,47 +44,48 @@ class Gettext extends \Phalcon\Translate\Adapter implements \ArrayAccess /** - * @return string|array + * @return string|array */ public function getDirectory() {} /** - * @return string + * @return string */ public function getDefaultDomain() {} /** - * @return string + * @return string */ public function getLocale() {} /** - * @return int + * @return int */ public function getCategory() {} /** * Phalcon\Translate\Adapter\Gettext constructor * - * @param array $options + * @param array $options */ public function __construct(array $options) {} /** * Returns the translation related to the given key * - * @param string $index - * @param array $placeholders - * @param string $domain - * @return string + * + * @param string $index + * @param array $placeholders + * @param string $domain + * @return string */ public function query($index, $placeholders = null) {} /** * Check whether is defined a translation key in the internal array * - * @param string $index - * @return bool + * @param string $index + * @return bool */ public function exists($index) {} @@ -89,81 +93,86 @@ public function exists($index) {} * The plural version of gettext(). * Some languages have more than one form for plural messages dependent on the count. * - * @param string $msgid1 - * @param string $msgid2 - * @param int $count - * @param mixed $placeholders - * @param string $domain - * @return string + * @param string $msgid1 + * @param string $msgid2 + * @param int $count + * @param mixed $placeholders + * @param string $domain + * @return string */ public function nquery($msgid1, $msgid2, $count, $placeholders = null, $domain = null) {} /** * Changes the current domain (i.e. the translation file) * - * @param mixed $domain - * @return string + * @param mixed $domain + * @return string */ public function setDomain($domain) {} /** * Sets the default domain * - * @return string + * @return string */ public function resetDomain() {} /** * Sets the domain default to search within when calls are made to gettext() * - * @param string $domain + * @param string $domain */ public function setDefaultDomain($domain) {} /** * Sets the path for a domain + * * * // Set the directory path * $gettext->setDirectory("/path/to/the/messages"); + * * // Set the domains and directories path * $gettext->setDirectory( - * [ - * "messages" => "/path/to/the/messages", - * "another" => "/path/to/the/another", - * ] + * [ + * "messages" => "/path/to/the/messages", + * "another" => "/path/to/the/another", + * ] * ); * * + * * @param string|array $directory The directory path or an array of directories and domains */ public function setDirectory($directory) {} /** * Sets locale information + * * * // Set locale to Dutch * $gettext->setLocale(LC_ALL, "nl_NL"); + * * // Try different possible locale names for german * $gettext->setLocale(LC_ALL, "de_DE@euro", "de_DE", "de", "ge"); * * - * @param int $category - * @param string $locale - * @return string|bool + * @param int $category + * @param string $locale + * @return string|bool */ public function setLocale($category, $locale) {} /** * Validator for constructor * - * @param array $options + * @param array $options */ protected function prepareOptions(array $options) {} /** * Gets default options * - * @return array + * @return array */ protected function getOptionsDefault() {} diff --git a/ide/stubs/Phalcon/translate/adapter/NativeArray.php b/ide/stubs/Phalcon/translate/adapter/NativeArray.php index b1f760b3a..bd5f98c6c 100644 --- a/ide/stubs/Phalcon/translate/adapter/NativeArray.php +++ b/ide/stubs/Phalcon/translate/adapter/NativeArray.php @@ -4,6 +4,7 @@ /** * Phalcon\Translate\Adapter\NativeArray + * * Allows to define translation lists using PHP arrays */ class NativeArray extends \Phalcon\Translate\Adapter implements \ArrayAccess @@ -15,24 +16,24 @@ class NativeArray extends \Phalcon\Translate\Adapter implements \ArrayAccess /** * Phalcon\Translate\Adapter\NativeArray constructor * - * @param array $options + * @param array $options */ public function __construct(array $options) {} /** * Returns the translation related to the given key * - * @param string $index - * @param mixed $placeholders - * @return string + * @param string $index + * @param mixed $placeholders + * @return string */ public function query($index, $placeholders = null) {} /** * Check whether is defined a translation key in the internal array * - * @param string $index - * @return bool + * @param string $index + * @return bool */ public function exists($index) {} diff --git a/ide/stubs/Phalcon/translate/interpolator/AssociativeArray.php b/ide/stubs/Phalcon/translate/interpolator/AssociativeArray.php index 96bc198cb..cfb6f0507 100644 --- a/ide/stubs/Phalcon/translate/interpolator/AssociativeArray.php +++ b/ide/stubs/Phalcon/translate/interpolator/AssociativeArray.php @@ -9,9 +9,9 @@ class AssociativeArray implements \Phalcon\Translate\InterpolatorInterface /** * Replaces placeholders by the values passed * - * @param string $translation - * @param mixed $placeholders - * @return string + * @param string $translation + * @param mixed $placeholders + * @return string */ public function replacePlaceholders($translation, $placeholders = null) {} diff --git a/ide/stubs/Phalcon/translate/interpolator/IndexedArray.php b/ide/stubs/Phalcon/translate/interpolator/IndexedArray.php index 099f3f97f..f668236ec 100644 --- a/ide/stubs/Phalcon/translate/interpolator/IndexedArray.php +++ b/ide/stubs/Phalcon/translate/interpolator/IndexedArray.php @@ -9,9 +9,9 @@ class IndexedArray implements \Phalcon\Translate\InterpolatorInterface /** * Replaces placeholders by the values passed * - * @param string $translation - * @param mixed $placeholders - * @return string + * @param string $translation + * @param mixed $placeholders + * @return string */ public function replacePlaceholders($translation, $placeholders = null) {} diff --git a/ide/stubs/Phalcon/validation/CombinedFieldsValidator.php b/ide/stubs/Phalcon/validation/CombinedFieldsValidator.php index 837098945..5ba331a0e 100644 --- a/ide/stubs/Phalcon/validation/CombinedFieldsValidator.php +++ b/ide/stubs/Phalcon/validation/CombinedFieldsValidator.php @@ -4,6 +4,7 @@ /** * Phalcon\Validation\CombinedFieldsValidator + * * This is a base class for combined fields validators */ abstract class CombinedFieldsValidator extends \Phalcon\Validation\Validator diff --git a/ide/stubs/Phalcon/validation/Exception.php b/ide/stubs/Phalcon/validation/Exception.php index 63f30b467..4df9fcd19 100644 --- a/ide/stubs/Phalcon/validation/Exception.php +++ b/ide/stubs/Phalcon/validation/Exception.php @@ -4,7 +4,9 @@ /** * Phalcon\Validation\Exception - * Exceptions thrown in Phalcon\Validation\* classes will use this class + * + * Exceptions thrown in Phalcon\Validation\ classes will use this class + * */ class Exception extends \Phalcon\Exception { diff --git a/ide/stubs/Phalcon/validation/Message.php b/ide/stubs/Phalcon/validation/Message.php index f1cd4bbcb..3c4852d64 100644 --- a/ide/stubs/Phalcon/validation/Message.php +++ b/ide/stubs/Phalcon/validation/Message.php @@ -4,6 +4,7 @@ /** * Phalcon\Validation\Message + * * Encapsulates validation info generated in the validation process */ class Message implements \Phalcon\Validation\MessageInterface @@ -24,85 +25,86 @@ class Message implements \Phalcon\Validation\MessageInterface /** * Phalcon\Validation\Message constructor * - * @param string $message - * @param mixed $field - * @param string $type - * @param int $code + * @param string $message + * @param mixed $field + * @param string $type + * @param int $code */ public function __construct($message, $field = null, $type = null, $code = null) {} /** * Sets message type * - * @param string $type - * @return Message + * @param string $type + * @return Message */ public function setType($type) {} /** * Returns message type * - * @return string + * @return string */ public function getType() {} /** * Sets verbose message * - * @param string $message - * @return Message + * @param string $message + * @return Message */ public function setMessage($message) {} /** * Returns verbose message * - * @return string + * @return string */ public function getMessage() {} /** * Sets field name related to message * - * @param mixed $field - * @return Message + * @param mixed $field + * @return Message */ public function setField($field) {} /** * Returns field name related to message * - * @return mixed + * + * @return mixed */ public function getField() {} /** * Sets code for the message * - * @param int $code - * @return Message + * @param int $code + * @return Message */ public function setCode($code) {} /** * Returns the message code * - * @return int + * @return int */ public function getCode() {} /** * Magic __toString method returns verbose message * - * @return string + * @return string */ public function __toString() {} /** * Magic __set_state helps to recover messages from serialization * - * @param array $message - * @return Message + * @param array $message + * @return Message */ public static function __set_state(array $message) {} diff --git a/ide/stubs/Phalcon/validation/MessageInterface.php b/ide/stubs/Phalcon/validation/MessageInterface.php index dba1d6699..1012f644f 100644 --- a/ide/stubs/Phalcon/validation/MessageInterface.php +++ b/ide/stubs/Phalcon/validation/MessageInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Validation\Message + * * Interface for Phalcon\Validation\Message */ interface MessageInterface @@ -12,60 +13,62 @@ interface MessageInterface /** * Sets message type * - * @param string $type - * @return \Phalcon\Validation\Message + * @param string $type + * @return \Phalcon\Validation\Message */ public function setType($type); /** * Returns message type * - * @return string + * @return string */ public function getType(); /** * Sets verbose message * - * @param string $message - * @return \Phalcon\Validation\Message + * @param string $message + * @return \Phalcon\Validation\Message */ public function setMessage($message); /** * Returns verbose message * - * @return string + * + * @return string */ public function getMessage(); /** * Sets field name related to message * - * @param string $field - * @return \Phalcon\Validation\Message + * @param string $field + * @return \Phalcon\Validation\Message */ public function setField($field); /** * Returns field name related to message * - * @return string + * + * @return string */ public function getField(); /** * Magic __toString method returns verbose message * - * @return string + * @return string */ public function __toString(); /** * Magic __set_state helps to recover messages from serialization * - * @param array $message - * @return MessageInterface + * @param array $message + * @return MessageInterface */ public static function __set_state(array $message); diff --git a/ide/stubs/Phalcon/validation/Validator.php b/ide/stubs/Phalcon/validation/Validator.php index 48993001c..510d25ff8 100644 --- a/ide/stubs/Phalcon/validation/Validator.php +++ b/ide/stubs/Phalcon/validation/Validator.php @@ -4,6 +4,7 @@ /** * Phalcon\Validation\Validator + * * This is a base class for validators */ abstract class Validator implements \Phalcon\Validation\ValidatorInterface @@ -15,25 +16,27 @@ abstract class Validator implements \Phalcon\Validation\ValidatorInterface /** * Phalcon\Validation\Validator constructor * - * @param array $options + * @param array $options */ public function __construct(array $options = null) {} /** * Checks if an option has been defined * + * * @deprecated since 2.1.0 * @see \Phalcon\Validation\Validator::hasOption() - * @param string $key - * @return bool + * @param string $key + * @deprecated + * @return bool */ public function isSetOption($key) {} /** * Checks if an option is defined * - * @param string $key - * @return bool + * @param string $key + * @return bool */ public function hasOption($key) {} @@ -41,26 +44,26 @@ public function hasOption($key) {} * Returns an option in the validator's options * Returns null if the option hasn't set * - * @param string $key - * @param mixed $defaultValue - * @return mixed + * @param string $key + * @param mixed $defaultValue + * @return mixed */ public function getOption($key, $defaultValue = null) {} /** * Sets an option in the validator * - * @param string $key - * @param mixed $value + * @param string $key + * @param mixed $value */ public function setOption($key, $value) {} /** * Executes the validation * - * @param mixed $validation - * @param string $attribute - * @return bool + * @param \Phalcon\Validation $validation + * @param string $attribute + * @return bool */ abstract public function validate(\Phalcon\Validation $validation, $attribute); diff --git a/ide/stubs/Phalcon/validation/ValidatorInterface.php b/ide/stubs/Phalcon/validation/ValidatorInterface.php index 13482f208..5cf7d7652 100644 --- a/ide/stubs/Phalcon/validation/ValidatorInterface.php +++ b/ide/stubs/Phalcon/validation/ValidatorInterface.php @@ -4,6 +4,7 @@ /** * Phalcon\Validation\ValidatorInterface + * * Interface for Phalcon\Validation\Validator */ interface ValidatorInterface @@ -12,8 +13,8 @@ interface ValidatorInterface /** * Checks if an option is defined * - * @param string $key - * @return bool + * @param string $key + * @return bool */ public function hasOption($key); @@ -21,18 +22,18 @@ public function hasOption($key); * Returns an option in the validator's options * Returns null if the option hasn't set * - * @param string $key - * @param mixed $defaultValue - * @return mixed + * @param string $key + * @param mixed $defaultValue + * @return mixed */ public function getOption($key, $defaultValue = null); /** * Executes the validation * - * @param mixed $validation - * @param string $attribute - * @return bool + * @param \Phalcon\Validation $validation + * @param string $attribute + * @return bool */ public function validate(\Phalcon\Validation $validation, $attribute); diff --git a/ide/stubs/Phalcon/validation/message/Group.php b/ide/stubs/Phalcon/validation/message/Group.php index 93701db68..3e0aa22ab 100644 --- a/ide/stubs/Phalcon/validation/message/Group.php +++ b/ide/stubs/Phalcon/validation/message/Group.php @@ -4,6 +4,7 @@ /** * Phalcon\Validation\Message\Group + * * Represents a group of validation messages */ class Group implements \Countable, \ArrayAccess, \Iterator @@ -18,91 +19,104 @@ class Group implements \Countable, \ArrayAccess, \Iterator /** * Phalcon\Validation\Message\Group constructor * - * @param array $messages + * + * @param array $messages */ public function __construct($messages = null) {} /** * Gets an attribute a message using the array syntax + * * * print_r( - * $messages[0] + * $messages[0] * ); * * - * @param int $index - * @return \Phalcon\Validation\Message + * + * @param int $index + * @return bool|\Phalcon\Validation\Message */ public function offsetGet($index) {} /** * Sets an attribute using the array-syntax + * * * $messages[0] = new \Phalcon\Validation\Message("This is a message"); * * - * @param int $index - * @param \Phalcon\Validation\Message $message + * + * @param int $index + * @param \Phalcon\Validation\Message $message */ public function offsetSet($index, $message) {} /** * Checks if an index exists + * * * var_dump( - * isset($message["database"]) + * isset($message["database"]) * ); * * - * @param int $index - * @return boolean + * + * @param int $index + * @return bool */ public function offsetExists($index) {} /** * Removes a message from the list + * * * unset($message["database"]); * * - * @param string $index + * + * @param string $index */ public function offsetUnset($index) {} /** * Appends a message to the group + * * * $messages->appendMessage( - * new \Phalcon\Validation\Message("This is a message") + * new \Phalcon\Validation\Message("This is a message") * ); * * - * @param mixed $message + * @param \Phalcon\Validation\MessageInterface $message */ public function appendMessage(\Phalcon\Validation\MessageInterface $message) {} /** * Appends an array of messages to the group + * * * $messages->appendMessages($messagesArray); * * - * @param \Phalcon\Validation\MessageInterface[] $messages + * + * @param \Phalcon\Validation\MessageInterface[] $messages */ public function appendMessages($messages) {} /** * Filters the message group by field name * - * @param string $fieldName - * @return array + * + * @param string $fieldName + * @return array */ public function filter($fieldName) {} /** * Returns the number of messages in the list * - * @return int + * @return int */ public function count() {} @@ -114,14 +128,14 @@ public function rewind() {} /** * Returns the current message in the iterator * - * @return \Phalcon\Validation\Message + * @return \Phalcon\Validation\Message */ public function current() {} /** * Returns the current position/key in the iterator * - * @return int + * @return int */ public function key() {} @@ -133,15 +147,16 @@ public function next() {} /** * Check if the current message in the iterator is valid * - * @return bool + * @return bool */ public function valid() {} /** * Magic __set_state helps to re-build messages variable when exporting * - * @param array $group - * @return \Phalcon\Validation\Message\Group + * + * @param array $group + * @return \Phalcon\Validation\Message\Group */ public static function __set_state($group) {} diff --git a/ide/stubs/Phalcon/validation/validator/Alnum.php b/ide/stubs/Phalcon/validation/validator/Alnum.php index 32b4c6ae4..8c784d33d 100644 --- a/ide/stubs/Phalcon/validation/validator/Alnum.php +++ b/ide/stubs/Phalcon/validation/validator/Alnum.php @@ -4,30 +4,34 @@ /** * Phalcon\Validation\Validator\Alnum + * * Check for alphanumeric character(s) + * * * use Phalcon\Validation\Validator\Alnum as AlnumValidator; + * * $validator->add( - * "username", - * new AlnumValidator( - * [ - * "message" => ":field must contain only alphanumeric characters", - * ] - * ) + * "username", + * new AlnumValidator( + * [ + * "message" => ":field must contain only alphanumeric characters", + * ] + * ) * ); + * * $validator->add( - * [ - * "username", - * "name", - * ], - * new AlnumValidator( - * [ - * "message" => [ - * "username" => "username must contain only alphanumeric characters", - * "name" => "name must contain only alphanumeric characters", - * ], - * ] - * ) + * [ + * "username", + * "name", + * ], + * new AlnumValidator( + * [ + * "message" => [ + * "username" => "username must contain only alphanumeric characters", + * "name" => "name must contain only alphanumeric characters", + * ], + * ] + * ) * ); * */ @@ -37,9 +41,9 @@ class Alnum extends \Phalcon\Validation\Validator /** * Executes the validation * - * @param mixed $validation - * @param string $field - * @return bool + * @param \Phalcon\Validation $validation + * @param string $field + * @return bool */ public function validate(\Phalcon\Validation $validation, $field) {} diff --git a/ide/stubs/Phalcon/validation/validator/Alpha.php b/ide/stubs/Phalcon/validation/validator/Alpha.php index 6f3ad27c7..72c2e0c43 100644 --- a/ide/stubs/Phalcon/validation/validator/Alpha.php +++ b/ide/stubs/Phalcon/validation/validator/Alpha.php @@ -4,30 +4,34 @@ /** * Phalcon\Validation\Validator\Alpha + * * Check for alphabetic character(s) + * * * use Phalcon\Validation\Validator\Alpha as AlphaValidator; + * * $validator->add( - * "username", - * new AlphaValidator( - * [ - * "message" => ":field must contain only letters", - * ] - * ) + * "username", + * new AlphaValidator( + * [ + * "message" => ":field must contain only letters", + * ] + * ) * ); + * * $validator->add( - * [ - * "username", - * "name", - * ], - * new AlphaValidator( - * [ - * "message" => [ - * "username" => "username must contain only letters", - * "name" => "name must contain only letters", - * ], - * ] - * ) + * [ + * "username", + * "name", + * ], + * new AlphaValidator( + * [ + * "message" => [ + * "username" => "username must contain only letters", + * "name" => "name must contain only letters", + * ], + * ] + * ) * ); * */ @@ -37,9 +41,9 @@ class Alpha extends \Phalcon\Validation\Validator /** * Executes the validation * - * @param mixed $validation - * @param string $field - * @return bool + * @param \Phalcon\Validation $validation + * @param string $field + * @return bool */ public function validate(\Phalcon\Validation $validation, $field) {} diff --git a/ide/stubs/Phalcon/validation/validator/Between.php b/ide/stubs/Phalcon/validation/validator/Between.php index 45a1630c2..1f3ffc2a6 100644 --- a/ide/stubs/Phalcon/validation/validator/Between.php +++ b/ide/stubs/Phalcon/validation/validator/Between.php @@ -4,41 +4,45 @@ /** * Phalcon\Validation\Validator\Between + * * Validates that a value is between an inclusive range of two values. * For a value x, the test is passed if minimum<=x<=maximum. + * * * use Phalcon\Validation\Validator\Between; + * * $validator->add( - * "price", - * new Between( - * [ - * "minimum" => 0, - * "maximum" => 100, - * "message" => "The price must be between 0 and 100", - * ] - * ) + * "price", + * new Between( + * [ + * "minimum" => 0, + * "maximum" => 100, + * "message" => "The price must be between 0 and 100", + * ] + * ) * ); + * * $validator->add( - * [ - * "price", - * "amount", - * ], - * new Between( - * [ - * "minimum" => [ - * "price" => 0, - * "amount" => 0, - * ], - * "maximum" => [ - * "price" => 100, - * "amount" => 50, - * ], - * "message" => [ - * "price" => "The price must be between 0 and 100", - * "amount" => "The amount must be between 0 and 50", - * ], - * ] - * ) + * [ + * "price", + * "amount", + * ], + * new Between( + * [ + * "minimum" => [ + * "price" => 0, + * "amount" => 0, + * ], + * "maximum" => [ + * "price" => 100, + * "amount" => 50, + * ], + * "message" => [ + * "price" => "The price must be between 0 and 100", + * "amount" => "The amount must be between 0 and 50", + * ], + * ] + * ) * ); * */ @@ -48,9 +52,9 @@ class Between extends \Phalcon\Validation\Validator /** * Executes the validation * - * @param mixed $validation - * @param string $field - * @return bool + * @param \Phalcon\Validation $validation + * @param string $field + * @return bool */ public function validate(\Phalcon\Validation $validation, $field) {} diff --git a/ide/stubs/Phalcon/validation/validator/Confirmation.php b/ide/stubs/Phalcon/validation/validator/Confirmation.php index 7cd69ac2d..c54b7b0c9 100644 --- a/ide/stubs/Phalcon/validation/validator/Confirmation.php +++ b/ide/stubs/Phalcon/validation/validator/Confirmation.php @@ -4,35 +4,39 @@ /** * Phalcon\Validation\Validator\Confirmation + * * Checks that two values have the same value + * * * use Phalcon\Validation\Validator\Confirmation; + * * $validator->add( - * "password", - * new Confirmation( - * [ - * "message" => "Password doesn't match confirmation", - * "with" => "confirmPassword", - * ] - * ) + * "password", + * new Confirmation( + * [ + * "message" => "Password doesn't match confirmation", + * "with" => "confirmPassword", + * ] + * ) * ); + * * $validator->add( - * [ - * "password", - * "email", - * ], - * new Confirmation( - * [ - * "message" => [ - * "password" => "Password doesn't match confirmation", - * "email" => "Email doesn't match confirmation", - * ], - * "with" => [ - * "password" => "confirmPassword", - * "email" => "confirmEmail", - * ], - * ] - * ) + * [ + * "password", + * "email", + * ], + * new Confirmation( + * [ + * "message" => [ + * "password" => "Password doesn't match confirmation", + * "email" => "Email doesn't match confirmation", + * ], + * "with" => [ + * "password" => "confirmPassword", + * "email" => "confirmEmail", + * ], + * ] + * ) * ); * */ @@ -42,18 +46,18 @@ class Confirmation extends \Phalcon\Validation\Validator /** * Executes the validation * - * @param mixed $validation - * @param string $field - * @return bool + * @param \Phalcon\Validation $validation + * @param string $field + * @return bool */ public function validate(\Phalcon\Validation $validation, $field) {} /** * Compare strings * - * @param string $a - * @param string $b - * @return bool + * @param string $a + * @param string $b + * @return bool */ protected final function compare($a, $b) {} diff --git a/ide/stubs/Phalcon/validation/validator/CreditCard.php b/ide/stubs/Phalcon/validation/validator/CreditCard.php index 330459109..a1f8109e4 100644 --- a/ide/stubs/Phalcon/validation/validator/CreditCard.php +++ b/ide/stubs/Phalcon/validation/validator/CreditCard.php @@ -4,30 +4,34 @@ /** * Phalcon\Validation\Validator\CreditCard + * * Checks if a value has a valid credit card number + * * * use Phalcon\Validation\Validator\CreditCard as CreditCardValidator; + * * $validator->add( - * "creditCard", - * new CreditCardValidator( - * [ - * "message" => "The credit card number is not valid", - * ] - * ) + * "creditCard", + * new CreditCardValidator( + * [ + * "message" => "The credit card number is not valid", + * ] + * ) * ); + * * $validator->add( - * [ - * "creditCard", - * "secondCreditCard", - * ], - * new CreditCardValidator( - * [ - * "message" => [ - * "creditCard" => "The credit card number is not valid", - * "secondCreditCard" => "The second credit card number is not valid", - * ], - * ] - * ) + * [ + * "creditCard", + * "secondCreditCard", + * ], + * new CreditCardValidator( + * [ + * "message" => [ + * "creditCard" => "The credit card number is not valid", + * "secondCreditCard" => "The second credit card number is not valid", + * ], + * ] + * ) * ); * */ @@ -37,17 +41,17 @@ class CreditCard extends \Phalcon\Validation\Validator /** * Executes the validation * - * @param mixed $validation - * @param string $field - * @return bool + * @param \Phalcon\Validation $validation + * @param string $field + * @return bool */ public function validate(\Phalcon\Validation $validation, $field) {} /** * is a simple checksum formula used to validate a variety of identification numbers * - * @param string $number - * @return boolean + * @param string $number + * @return bool */ private function verifyByLuhnAlgorithm($number) {} diff --git a/ide/stubs/Phalcon/validation/validator/Date.php b/ide/stubs/Phalcon/validation/validator/Date.php index de9d81481..306d07474 100644 --- a/ide/stubs/Phalcon/validation/validator/Date.php +++ b/ide/stubs/Phalcon/validation/validator/Date.php @@ -4,35 +4,39 @@ /** * Phalcon\Validation\Validator\Date + * * Checks if a value is a valid date + * * * use Phalcon\Validation\Validator\Date as DateValidator; + * * $validator->add( - * "date", - * new DateValidator( - * [ - * "format" => "d-m-Y", - * "message" => "The date is invalid", - * ] - * ) + * "date", + * new DateValidator( + * [ + * "format" => "d-m-Y", + * "message" => "The date is invalid", + * ] + * ) * ); + * * $validator->add( - * [ - * "date", - * "anotherDate", - * ], - * new DateValidator( - * [ - * "format" => [ - * "date" => "d-m-Y", - * "anotherDate" => "Y-m-d", - * ], - * "message" => [ - * "date" => "The date is invalid", - * "anotherDate" => "The another date is invalid", - * ], - * ] - * ) + * [ + * "date", + * "anotherDate", + * ], + * new DateValidator( + * [ + * "format" => [ + * "date" => "d-m-Y", + * "anotherDate" => "Y-m-d", + * ], + * "message" => [ + * "date" => "The date is invalid", + * "anotherDate" => "The another date is invalid", + * ], + * ] + * ) * ); * */ @@ -42,16 +46,16 @@ class Date extends \Phalcon\Validation\Validator /** * Executes the validation * - * @param mixed $validation - * @param string $field - * @return bool + * @param \Phalcon\Validation $validation + * @param string $field + * @return bool */ public function validate(\Phalcon\Validation $validation, $field) {} /** - * @param mixed $value - * @param mixed $format - * @return bool + * @param mixed $value + * @param mixed $format + * @return bool */ private function checkDate($value, $format) {} diff --git a/ide/stubs/Phalcon/validation/validator/Digit.php b/ide/stubs/Phalcon/validation/validator/Digit.php index a271390f2..8b6e3d202 100644 --- a/ide/stubs/Phalcon/validation/validator/Digit.php +++ b/ide/stubs/Phalcon/validation/validator/Digit.php @@ -4,30 +4,34 @@ /** * Phalcon\Validation\Validator\Digit + * * Check for numeric character(s) + * * * use Phalcon\Validation\Validator\Digit as DigitValidator; + * * $validator->add( - * "height", - * new DigitValidator( - * [ - * "message" => ":field must be numeric", - * ] - * ) + * "height", + * new DigitValidator( + * [ + * "message" => ":field must be numeric", + * ] + * ) * ); + * * $validator->add( - * [ - * "height", - * "width", - * ], - * new DigitValidator( - * [ - * "message" => [ - * "height" => "height must be numeric", - * "width" => "width must be numeric", - * ], - * ] - * ) + * [ + * "height", + * "width", + * ], + * new DigitValidator( + * [ + * "message" => [ + * "height" => "height must be numeric", + * "width" => "width must be numeric", + * ], + * ] + * ) * ); * */ @@ -37,9 +41,9 @@ class Digit extends \Phalcon\Validation\Validator /** * Executes the validation * - * @param mixed $validation - * @param string $field - * @return bool + * @param \Phalcon\Validation $validation + * @param string $field + * @return bool */ public function validate(\Phalcon\Validation $validation, $field) {} diff --git a/ide/stubs/Phalcon/validation/validator/Email.php b/ide/stubs/Phalcon/validation/validator/Email.php index f52d3ca12..9314f976c 100644 --- a/ide/stubs/Phalcon/validation/validator/Email.php +++ b/ide/stubs/Phalcon/validation/validator/Email.php @@ -4,30 +4,34 @@ /** * Phalcon\Validation\Validator\Email + * * Checks if a value has a correct e-mail format + * * * use Phalcon\Validation\Validator\Email as EmailValidator; + * * $validator->add( - * "email", - * new EmailValidator( - * [ - * "message" => "The e-mail is not valid", - * ] - * ) + * "email", + * new EmailValidator( + * [ + * "message" => "The e-mail is not valid", + * ] + * ) * ); + * * $validator->add( - * [ - * "email", - * "anotherEmail", - * ], - * new EmailValidator( - * [ - * "message" => [ - * "email" => "The e-mail is not valid", - * "anotherEmail" => "The another e-mail is not valid", - * ], - * ] - * ) + * [ + * "email", + * "anotherEmail", + * ], + * new EmailValidator( + * [ + * "message" => [ + * "email" => "The e-mail is not valid", + * "anotherEmail" => "The another e-mail is not valid", + * ], + * ] + * ) * ); * */ @@ -37,9 +41,9 @@ class Email extends \Phalcon\Validation\Validator /** * Executes the validation * - * @param mixed $validation - * @param string $field - * @return bool + * @param \Phalcon\Validation $validation + * @param string $field + * @return bool */ public function validate(\Phalcon\Validation $validation, $field) {} diff --git a/ide/stubs/Phalcon/validation/validator/ExclusionIn.php b/ide/stubs/Phalcon/validation/validator/ExclusionIn.php index aeadba6f6..cc3167d67 100644 --- a/ide/stubs/Phalcon/validation/validator/ExclusionIn.php +++ b/ide/stubs/Phalcon/validation/validator/ExclusionIn.php @@ -4,41 +4,45 @@ /** * Phalcon\Validation\Validator\ExclusionIn + * * Check if a value is not included into a list of values + * * * use Phalcon\Validation\Validator\ExclusionIn; + * * $validator->add( - * "status", - * new ExclusionIn( - * [ - * "message" => "The status must not be A or B", - * "domain" => [ - * "A", - * "B", - * ], - * ] - * ) + * "status", + * new ExclusionIn( + * [ + * "message" => "The status must not be A or B", + * "domain" => [ + * "A", + * "B", + * ], + * ] + * ) * ); + * * $validator->add( - * [ - * "status", - * "type", - * ], - * new ExclusionIn( - * [ - * "message" => [ - * "status" => "The status must not be A or B", - * "type" => "The type must not be 1 or "' - * ], - * "domain" => [ - * "status" => [ - * "A", - * "B", - * ], - * "type" => [1, 2], - * ], - * ] - * ) + * [ + * "status", + * "type", + * ], + * new ExclusionIn( + * [ + * "message" => [ + * "status" => "The status must not be A or B", + * "type" => "The type must not be 1 or "' + * ], + * "domain" => [ + * "status" => [ + * "A", + * "B", + * ], + * "type" => [1, 2], + * ], + * ] + * ) * ); * */ @@ -48,9 +52,9 @@ class ExclusionIn extends \Phalcon\Validation\Validator /** * Executes the validation * - * @param mixed $validation - * @param string $field - * @return bool + * @param \Phalcon\Validation $validation + * @param string $field + * @return bool */ public function validate(\Phalcon\Validation $validation, $field) {} diff --git a/ide/stubs/Phalcon/validation/validator/File.php b/ide/stubs/Phalcon/validation/validator/File.php index dfe67b751..20abe969f 100644 --- a/ide/stubs/Phalcon/validation/validator/File.php +++ b/ide/stubs/Phalcon/validation/validator/File.php @@ -4,63 +4,67 @@ /** * Phalcon\Validation\Validator\File + * * Checks if a value has a correct file + * * * use Phalcon\Validation\Validator\File as FileValidator; + * * $validator->add( - * "file", - * new FileValidator( - * [ - * "maxSize" => "2M", - * "messageSize" => ":field exceeds the max filesize (:max)", - * "allowedTypes" => [ - * "image/jpeg", - * "image/png", - * ], - * "messageType" => "Allowed file types are :types", - * "maxResolution" => "800x600", - * "messageMaxResolution" => "Max resolution of :field is :max", - * ] - * ) + * "file", + * new FileValidator( + * [ + * "maxSize" => "2M", + * "messageSize" => ":field exceeds the max filesize (:max)", + * "allowedTypes" => [ + * "image/jpeg", + * "image/png", + * ], + * "messageType" => "Allowed file types are :types", + * "maxResolution" => "800x600", + * "messageMaxResolution" => "Max resolution of :field is :max", + * ] + * ) * ); + * * $validator->add( - * [ - * "file", - * "anotherFile", - * ], - * new FileValidator( - * [ - * "maxSize" => [ - * "file" => "2M", - * "anotherFile" => "4M", - * ], - * "messageSize" => [ - * "file" => "file exceeds the max filesize 2M", - * "anotherFile" => "anotherFile exceeds the max filesize 4M", - * "allowedTypes" => [ - * "file" => [ - * "image/jpeg", - * "image/png", - * ], - * "anotherFile" => [ - * "image/gif", - * "image/bmp", - * ], - * ], - * "messageType" => [ - * "file" => "Allowed file types are image/jpeg and image/png", - * "anotherFile" => "Allowed file types are image/gif and image/bmp", - * ], - * "maxResolution" => [ - * "file" => "800x600", - * "anotherFile" => "1024x768", - * ], - * "messageMaxResolution" => [ - * "file" => "Max resolution of file is 800x600", - * "anotherFile" => "Max resolution of file is 1024x768", - * ], - * ] - * ) + * [ + * "file", + * "anotherFile", + * ], + * new FileValidator( + * [ + * "maxSize" => [ + * "file" => "2M", + * "anotherFile" => "4M", + * ], + * "messageSize" => [ + * "file" => "file exceeds the max filesize 2M", + * "anotherFile" => "anotherFile exceeds the max filesize 4M", + * "allowedTypes" => [ + * "file" => [ + * "image/jpeg", + * "image/png", + * ], + * "anotherFile" => [ + * "image/gif", + * "image/bmp", + * ], + * ], + * "messageType" => [ + * "file" => "Allowed file types are image/jpeg and image/png", + * "anotherFile" => "Allowed file types are image/gif and image/bmp", + * ], + * "maxResolution" => [ + * "file" => "800x600", + * "anotherFile" => "1024x768", + * ], + * "messageMaxResolution" => [ + * "file" => "Max resolution of file is 800x600", + * "anotherFile" => "Max resolution of file is 1024x768", + * ], + * ] + * ) * ); * */ @@ -70,18 +74,18 @@ class File extends \Phalcon\Validation\Validator /** * Executes the validation * - * @param mixed $validation - * @param string $field - * @return bool + * @param \Phalcon\Validation $validation + * @param string $field + * @return bool */ public function validate(\Phalcon\Validation $validation, $field) {} /** * Check on empty * - * @param mixed $validation - * @param string $field - * @return bool + * @param \Phalcon\Validation $validation + * @param string $field + * @return bool */ public function isAllowEmpty(\Phalcon\Validation $validation, $field) {} diff --git a/ide/stubs/Phalcon/validation/validator/Identical.php b/ide/stubs/Phalcon/validation/validator/Identical.php index 01176c94c..a5525adc2 100644 --- a/ide/stubs/Phalcon/validation/validator/Identical.php +++ b/ide/stubs/Phalcon/validation/validator/Identical.php @@ -4,35 +4,39 @@ /** * Phalcon\Validation\Validator\Identical + * * Checks if a value is identical to other + * * * use Phalcon\Validation\Validator\Identical; + * * $validator->add( - * "terms", - * new Identical( - * [ - * "accepted" => "yes", - * "message" => "Terms and conditions must be accepted", - * ] - * ) + * "terms", + * new Identical( + * [ + * "accepted" => "yes", + * "message" => "Terms and conditions must be accepted", + * ] + * ) * ); + * * $validator->add( - * [ - * "terms", - * "anotherTerms", - * ], - * new Identical( - * [ - * "accepted" => [ - * "terms" => "yes", - * "anotherTerms" => "yes", - * ], - * "message" => [ - * "terms" => "Terms and conditions must be accepted", - * "anotherTerms" => "Another terms must be accepted", - * ], - * ] - * ) + * [ + * "terms", + * "anotherTerms", + * ], + * new Identical( + * [ + * "accepted" => [ + * "terms" => "yes", + * "anotherTerms" => "yes", + * ], + * "message" => [ + * "terms" => "Terms and conditions must be accepted", + * "anotherTerms" => "Another terms must be accepted", + * ], + * ] + * ) * ); * */ @@ -42,9 +46,9 @@ class Identical extends \Phalcon\Validation\Validator /** * Executes the validation * - * @param mixed $validation - * @param string $field - * @return bool + * @param \Phalcon\Validation $validation + * @param string $field + * @return bool */ public function validate(\Phalcon\Validation $validation, $field) {} diff --git a/ide/stubs/Phalcon/validation/validator/InclusionIn.php b/ide/stubs/Phalcon/validation/validator/InclusionIn.php index 5649f2788..54b18d609 100644 --- a/ide/stubs/Phalcon/validation/validator/InclusionIn.php +++ b/ide/stubs/Phalcon/validation/validator/InclusionIn.php @@ -4,35 +4,39 @@ /** * Phalcon\Validation\Validator\InclusionIn + * * Check if a value is included into a list of values + * * * use Phalcon\Validation\Validator\InclusionIn; + * * $validator->add( - * "status", - * new InclusionIn( - * [ - * "message" => "The status must be A or B", - * "domain" => ["A", "B"], - * ] - * ) + * "status", + * new InclusionIn( + * [ + * "message" => "The status must be A or B", + * "domain" => ["A", "B"], + * ] + * ) * ); + * * $validator->add( - * [ - * "status", - * "type", - * ], - * new InclusionIn( - * [ - * "message" => [ - * "status" => "The status must be A or B", - * "type" => "The status must be 1 or 2", - * ], - * "domain" => [ - * "status" => ["A", "B"], - * "type" => [1, 2], - * ] - * ] - * ) + * [ + * "status", + * "type", + * ], + * new InclusionIn( + * [ + * "message" => [ + * "status" => "The status must be A or B", + * "type" => "The status must be 1 or 2", + * ], + * "domain" => [ + * "status" => ["A", "B"], + * "type" => [1, 2], + * ] + * ] + * ) * ); * */ @@ -42,9 +46,9 @@ class InclusionIn extends \Phalcon\Validation\Validator /** * Executes the validation * - * @param mixed $validation - * @param string $field - * @return bool + * @param \Phalcon\Validation $validation + * @param string $field + * @return bool */ public function validate(\Phalcon\Validation $validation, $field) {} diff --git a/ide/stubs/Phalcon/validation/validator/Numericality.php b/ide/stubs/Phalcon/validation/validator/Numericality.php index 387799ae5..336b53818 100644 --- a/ide/stubs/Phalcon/validation/validator/Numericality.php +++ b/ide/stubs/Phalcon/validation/validator/Numericality.php @@ -4,30 +4,34 @@ /** * Phalcon\Validation\Validator\Numericality + * * Check for a valid numeric value + * * * use Phalcon\Validation\Validator\Numericality; + * * $validator->add( - * "price", - * new Numericality( - * [ - * "message" => ":field is not numeric", - * ] - * ) + * "price", + * new Numericality( + * [ + * "message" => ":field is not numeric", + * ] + * ) * ); + * * $validator->add( - * [ - * "price", - * "amount", - * ], - * new Numericality( - * [ - * "message" => [ - * "price" => "price is not numeric", - * "amount" => "amount is not numeric", - * ] - * ] - * ) + * [ + * "price", + * "amount", + * ], + * new Numericality( + * [ + * "message" => [ + * "price" => "price is not numeric", + * "amount" => "amount is not numeric", + * ] + * ] + * ) * ); * */ @@ -37,9 +41,9 @@ class Numericality extends \Phalcon\Validation\Validator /** * Executes the validation * - * @param mixed $validation - * @param string $field - * @return bool + * @param \Phalcon\Validation $validation + * @param string $field + * @return bool */ public function validate(\Phalcon\Validation $validation, $field) {} diff --git a/ide/stubs/Phalcon/validation/validator/PresenceOf.php b/ide/stubs/Phalcon/validation/validator/PresenceOf.php index 6c96f0454..a0d766b75 100644 --- a/ide/stubs/Phalcon/validation/validator/PresenceOf.php +++ b/ide/stubs/Phalcon/validation/validator/PresenceOf.php @@ -4,30 +4,34 @@ /** * Phalcon\Validation\Validator\PresenceOf + * * Validates that a value is not null or empty string + * * * use Phalcon\Validation\Validator\PresenceOf; + * * $validator->add( - * "name", - * new PresenceOf( - * [ - * "message" => "The name is required", - * ] - * ) + * "name", + * new PresenceOf( + * [ + * "message" => "The name is required", + * ] + * ) * ); + * * $validator->add( - * [ - * "name", - * "email", - * ], - * new PresenceOf( - * [ - * "message" => [ - * "name" => "The name is required", - * "email" => "The email is required", - * ], - * ] - * ) + * [ + * "name", + * "email", + * ], + * new PresenceOf( + * [ + * "message" => [ + * "name" => "The name is required", + * "email" => "The email is required", + * ], + * ] + * ) * ); * */ @@ -37,9 +41,9 @@ class PresenceOf extends \Phalcon\Validation\Validator /** * Executes the validation * - * @param mixed $validation - * @param string $field - * @return bool + * @param \Phalcon\Validation $validation + * @param string $field + * @return bool */ public function validate(\Phalcon\Validation $validation, $field) {} diff --git a/ide/stubs/Phalcon/validation/validator/Regex.php b/ide/stubs/Phalcon/validation/validator/Regex.php index 506b253b6..bd5a0542a 100644 --- a/ide/stubs/Phalcon/validation/validator/Regex.php +++ b/ide/stubs/Phalcon/validation/validator/Regex.php @@ -4,35 +4,39 @@ /** * Phalcon\Validation\Validator\Regex + * * Allows validate if the value of a field matches a regular expression + * * * use Phalcon\Validation\Validator\Regex as RegexValidator; + * * $validator->add( - * "created_at", - * new RegexValidator( - * [ - * "pattern" => "/^[0-9]{4}[-\/](0[1-9]|1[12])[-\/](0[1-9]|[12][0-9]|3[01])$/", - * "message" => "The creation date is invalid", - * ] - * ) + * "created_at", + * new RegexValidator( + * [ + * "pattern" => "/^[0-9]{4}[-\/](0[1-9]|1[12])[-\/](0[1-9]|[12][0-9]|3[01])$/", + * "message" => "The creation date is invalid", + * ] + * ) * ); + * * $validator->add( - * [ - * "created_at", - * "name", - * ], - * new RegexValidator( - * [ - * "pattern" => [ - * "created_at" => "/^[0-9]{4}[-\/](0[1-9]|1[12])[-\/](0[1-9]|[12][0-9]|3[01])$/", - * "name" => "/^[a-z]$/", - * ], - * "message" => [ - * "created_at" => "The creation date is invalid", - * "name" => "The name is invalid", - * ] - * ] - * ) + * [ + * "created_at", + * "name", + * ], + * new RegexValidator( + * [ + * "pattern" => [ + * "created_at" => "/^[0-9]{4}[-\/](0[1-9]|1[12])[-\/](0[1-9]|[12][0-9]|3[01])$/", + * "name" => "/^[a-z]$/", + * ], + * "message" => [ + * "created_at" => "The creation date is invalid", + * "name" => "The name is invalid", + * ] + * ] + * ) * ); * */ @@ -42,9 +46,9 @@ class Regex extends \Phalcon\Validation\Validator /** * Executes the validation * - * @param mixed $validation - * @param string $field - * @return bool + * @param \Phalcon\Validation $validation + * @param string $field + * @return bool */ public function validate(\Phalcon\Validation $validation, $field) {} diff --git a/ide/stubs/Phalcon/validation/validator/StringLength.php b/ide/stubs/Phalcon/validation/validator/StringLength.php index 3b2ab5ede..1695fea92 100644 --- a/ide/stubs/Phalcon/validation/validator/StringLength.php +++ b/ide/stubs/Phalcon/validation/validator/StringLength.php @@ -4,47 +4,51 @@ /** * Phalcon\Validation\Validator\StringLength + * * Validates that a string has the specified maximum and minimum constraints * The test is passed if for a string's length L, min<=L<=max, i.e. L must * be at least min, and at most max. + * * * use Phalcon\Validation\Validator\StringLength as StringLength; + * * $validation->add( - * "name_last", - * new StringLength( - * [ - * "max" => 50, - * "min" => 2, - * "messageMaximum" => "We don't like really long names", - * "messageMinimum" => "We want more than just their initials", - * ] - * ) + * "name_last", + * new StringLength( + * [ + * "max" => 50, + * "min" => 2, + * "messageMaximum" => "We don't like really long names", + * "messageMinimum" => "We want more than just their initials", + * ] + * ) * ); + * * $validation->add( - * [ - * "name_last", - * "name_first", - * ], - * new StringLength( - * [ - * "max" => [ - * "name_last" => 50, - * "name_first" => 40, - * ], - * "min" => [ - * "name_last" => 2, - * "name_first" => 4, - * ], - * "messageMaximum" => [ - * "name_last" => "We don't like really long last names", - * "name_first" => "We don't like really long first names", - * ], - * "messageMinimum" => [ - * "name_last" => "We don't like too short last names", - * "name_first" => "We don't like too short first names", - * ] - * ] - * ) + * [ + * "name_last", + * "name_first", + * ], + * new StringLength( + * [ + * "max" => [ + * "name_last" => 50, + * "name_first" => 40, + * ], + * "min" => [ + * "name_last" => 2, + * "name_first" => 4, + * ], + * "messageMaximum" => [ + * "name_last" => "We don't like really long last names", + * "name_first" => "We don't like really long first names", + * ], + * "messageMinimum" => [ + * "name_last" => "We don't like too short last names", + * "name_first" => "We don't like too short first names", + * ] + * ] + * ) * ); * */ @@ -54,9 +58,9 @@ class StringLength extends \Phalcon\Validation\Validator /** * Executes the validation * - * @param mixed $validation - * @param string $field - * @return bool + * @param \Phalcon\Validation $validation + * @param string $field + * @return bool */ public function validate(\Phalcon\Validation $validation, $field) {} diff --git a/ide/stubs/Phalcon/validation/validator/Uniqueness.php b/ide/stubs/Phalcon/validation/validator/Uniqueness.php index 475e82227..a9a3be57a 100644 --- a/ide/stubs/Phalcon/validation/validator/Uniqueness.php +++ b/ide/stubs/Phalcon/validation/validator/Uniqueness.php @@ -4,61 +4,70 @@ /** * Phalcon\Validation\Validator\Uniqueness + * * Check that a field is unique in the related table + * * * use Phalcon\Validation\Validator\Uniqueness as UniquenessValidator; + * * $validator->add( - * "username", - * new UniquenessValidator( - * [ - * "model" => new Users(), - * "message" => ":field must be unique", - * ] - * ) + * "username", + * new UniquenessValidator( + * [ + * "model" => new Users(), + * "message" => ":field must be unique", + * ] + * ) * ); * + * * Different attribute from the field: * * $validator->add( - * "username", - * new UniquenessValidator( - * [ - * "model" => new Users(), - * "attribute" => "nick", - * ] - * ) + * "username", + * new UniquenessValidator( + * [ + * "model" => new Users(), + * "attribute" => "nick", + * ] + * ) * ); * + * * In model: * * $validator->add( - * "username", - * new UniquenessValidator() + * "username", + * new UniquenessValidator() * ); * + * * Combination of fields in model: * * $validator->add( - * [ - * "firstName", - * "lastName", - * ], - * new UniquenessValidator() + * [ + * "firstName", + * "lastName", + * ], + * new UniquenessValidator() * ); * + * * It is possible to convert values before validation. This is useful in * situations where values need to be converted to do the database lookup: + * * * $validator->add( - * "username", - * new UniquenessValidator( - * [ - * "convert" => function (array $values) { - * $values["username"] = strtolower($values["username"]); - * return $values; - * } - * ] - * ) + * "username", + * new UniquenessValidator( + * [ + * "convert" => function (array $values) { + * $values["username"] = strtolower($values["username"]); + * + * return $values; + * } + * ] + * ) * ); * */ @@ -71,25 +80,25 @@ class Uniqueness extends \Phalcon\Validation\CombinedFieldsValidator /** * Executes the validation * - * @param mixed $validation - * @param mixed $field - * @return bool + * @param \Phalcon\Validation $validation + * @param mixed $field + * @return bool */ public function validate(\Phalcon\Validation $validation, $field) {} /** - * @param mixed $validation - * @param mixed $field - * @return bool + * @param \Phalcon\Validation $validation + * @param mixed $field + * @return bool */ protected function isUniqueness(\Phalcon\Validation $validation, $field) {} /** * The column map is used in the case to get real column name * - * @param mixed $record - * @param string $field - * @return string + * @param mixed $record + * @param string $field + * @return string */ protected function getColumnNameReal($record, $field) {} diff --git a/ide/stubs/Phalcon/validation/validator/Url.php b/ide/stubs/Phalcon/validation/validator/Url.php index bb7d20b8d..8d5af7c75 100644 --- a/ide/stubs/Phalcon/validation/validator/Url.php +++ b/ide/stubs/Phalcon/validation/validator/Url.php @@ -4,30 +4,34 @@ /** * Phalcon\Validation\Validator\Url + * * Checks if a value has a url format + * * * use Phalcon\Validation\Validator\Url as UrlValidator; + * * $validator->add( - * "url", - * new UrlValidator( - * [ - * "message" => ":field must be a url", - * ] - * ) + * "url", + * new UrlValidator( + * [ + * "message" => ":field must be a url", + * ] + * ) * ); + * * $validator->add( - * [ - * "url", - * "homepage", - * ], - * new UrlValidator( - * [ - * "message" => [ - * "url" => "url must be a url", - * "homepage" => "homepage must be a url", - * ] - * ] - * ) + * [ + * "url", + * "homepage", + * ], + * new UrlValidator( + * [ + * "message" => [ + * "url" => "url must be a url", + * "homepage" => "homepage must be a url", + * ] + * ] + * ) * ); * */ @@ -37,9 +41,9 @@ class Url extends \Phalcon\Validation\Validator /** * Executes the validation * - * @param mixed $validation - * @param string $field - * @return bool + * @param \Phalcon\Validation $validation + * @param string $field + * @return bool */ public function validate(\Phalcon\Validation $validation, $field) {} diff --git a/scripts/Phalcon/Devtools/Version.php b/scripts/Phalcon/Devtools/Version.php index 1003b8496..fe2d5c6aa 100644 --- a/scripts/Phalcon/Devtools/Version.php +++ b/scripts/Phalcon/Devtools/Version.php @@ -39,6 +39,6 @@ class Version extends PhVersion */ protected static function _getVersion() { - return [3, 0, 2, 0, 0]; + return [3, 0, 3, 0, 0]; } }