Skip to content

Commit

Permalink
Updated stubs regarding to the 3.2.3 version
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyklay committed Oct 12, 2017
1 parent 24a70da commit 8eb9574
Show file tree
Hide file tree
Showing 26 changed files with 111 additions and 43 deletions.
26 changes: 15 additions & 11 deletions src/Phalcon/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ abstract class Dispatcher implements \Phalcon\DispatcherInterface, \Phalcon\Di\I
protected $_activeHandler;


protected $_finished;
protected $_finished = false;


protected $_forwarded = false;
Expand Down Expand Up @@ -95,6 +95,9 @@ abstract class Dispatcher implements \Phalcon\DispatcherInterface, \Phalcon\Di\I
protected $_modelBinder = null;


protected $_isControllerInitialize = false;


/**
* Sets the dependency injector
*
Expand Down Expand Up @@ -315,18 +318,16 @@ public function setModelBinder(\Phalcon\Mvc\Model\BinderInterface $modelBinder,
public function getModelBinder() {}

/**
* Dispatches a handle action taking into account the routing parameters
* Process the results of the router by calling into the appropriate controller action(s)
* including any routing data or injected parameters.
*
* @return object
*/
public function dispatch() {}

/**
* Dispatches a handle action taking into account the routing parameters
* @return object|false Returns the dispatched handler class (the Controller for Mvc dispatching or a Task
* for CLI dispatching) or <tt>false</tt> if an exception occurred and the operation was
* stopped by returning <tt>false</tt> in the exception handler.
*
* @return object
* @throws \Exception if any uncaught or unhandled exception occurs during the dispatcher process.
*/
protected function _dispatch() {}
public function dispatch() {}

/**
* Forwards the execution flow to another controller/action.
Expand All @@ -340,7 +341,10 @@ protected function _dispatch() {}
* );
* </code>
*
* @param array $forward
* @param array forward
*
* @throws \Phalcon\Exception
* @param mixed $forward
*/
public function forward($forward) {}

Expand Down
28 changes: 25 additions & 3 deletions src/Phalcon/db/Profiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,32 @@
* This helps you to identify bottlenecks in your applications.
*
* <code>
* $profiler = new \Phalcon\Db\Profiler();
* use Phalcon\Db\Profiler;
* use Phalcon\Events\Event;
* use Phalcon\Events\Manager;
*
* // Set the connection profiler
* $connection->setProfiler($profiler);
* $profiler = new Profiler();
* $eventsManager = new Manager();
*
* $eventsManager->attach(
* "db",
* function (Event $event, $connection) use ($profiler) {
* if ($event->getType() === "beforeQuery") {
* $sql = $connection->getSQLStatement();
*
* // Start a profile with the active connection
* $profiler->startProfile($sql);
* }
*
* if ($event->getType() === "afterQuery") {
* // Stop the active profile
* $profiler->stopProfile();
* }
* }
* );
*
* // Set the event manager on the connection
* $connection->setEventsManager($eventsManager);
*
* $sql = "SELECT buyer_name, quantity, product_name
* FROM buyers LEFT JOIN products ON
Expand Down
3 changes: 3 additions & 0 deletions src/Phalcon/http/response/Cookies.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ class Cookies implements \Phalcon\Http\Response\CookiesInterface, \Phalcon\Di\In
protected $_cookies;



public function __construct() {}

/**
* Sets the dependency injector
*
Expand Down
13 changes: 1 addition & 12 deletions src/Phalcon/mvc/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* $messages = $robot->getMessages();
*
* foreach ($messages as $message) {
* echo message;
* echo $message;
* }
* } else {
* echo "Great, a new robot was saved successfully!";
Expand Down Expand Up @@ -1022,7 +1022,6 @@ public function writeAttribute($attribute, $value) {}
* generated INSERT/UPDATE statement
*
* <code>
* <?php
*
* class Robots extends \Phalcon\Mvc\Model
* {
Expand All @@ -1046,7 +1045,6 @@ protected function skipAttributes(array $attributes) {}
* generated INSERT statement
*
* <code>
* <?php
*
* class Robots extends \Phalcon\Mvc\Model
* {
Expand All @@ -1070,7 +1068,6 @@ protected function skipAttributesOnCreate(array $attributes) {}
* generated UPDATE statement
*
* <code>
* <?php
*
* class Robots extends \Phalcon\Mvc\Model
* {
Expand All @@ -1094,7 +1091,6 @@ protected function skipAttributesOnUpdate(array $attributes) {}
* generated UPDATE statement
*
* <code>
* <?php
*
* class Robots extends \Phalcon\Mvc\Model
* {
Expand All @@ -1117,7 +1113,6 @@ protected function allowEmptyStringValues(array $attributes) {}
* Setup a 1-1 relation between two models
*
* <code>
* <?php
*
* class Robots extends \Phalcon\Mvc\Model
* {
Expand All @@ -1140,7 +1135,6 @@ protected function hasOne($fields, $referenceModel, $referencedFields, $options
* Setup a reverse 1-1 or n-1 relation between two models
*
* <code>
* <?php
*
* class RobotsParts extends \Phalcon\Mvc\Model
* {
Expand All @@ -1163,7 +1157,6 @@ protected function belongsTo($fields, $referenceModel, $referencedFields, $optio
* Setup a 1-n relation between two models
*
* <code>
* <?php
*
* class Robots extends \Phalcon\Mvc\Model
* {
Expand All @@ -1186,7 +1179,6 @@ protected function hasMany($fields, $referenceModel, $referencedFields, $options
* Setup an n-n relation between two models, through an intermediate relation
*
* <code>
* <?php
*
* class Robots extends \Phalcon\Mvc\Model
* {
Expand Down Expand Up @@ -1225,7 +1217,6 @@ protected function hasManyToMany($fields, $intermediateModel, $intermediateField
* Setups a behavior in a model
*
* <code>
* <?php
*
* use Phalcon\Mvc\Model;
* use Phalcon\Mvc\Model\Behavior\Timestampable;
Expand Down Expand Up @@ -1256,7 +1247,6 @@ public function addBehavior(\Phalcon\Mvc\Model\BehaviorInterface $behavior) {}
* Sets if the model must keep the original record snapshot in memory
*
* <code>
* <?php
*
* use Phalcon\Mvc\Model;
*
Expand Down Expand Up @@ -1376,7 +1366,6 @@ public function getUpdatedFields() {}
* Sets if a model must use dynamic update instead of the all-field update
*
* <code>
* <?php
*
* use Phalcon\Mvc\Model;
*
Expand Down
2 changes: 2 additions & 0 deletions src/Phalcon/mvc/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,8 @@ public function getActionName() {}
/**
* Gets extra parameters of the action rendered
*
* @deprecated Will be removed in 4.0.0
* @deprecated
* @return array
*/
public function getParams() {}
Expand Down
2 changes: 2 additions & 0 deletions src/Phalcon/mvc/ViewInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ public function getActionName();
/**
* Gets extra parameters of the action rendered
*
* @deprecated Will be removed in 4.0.0
* @deprecated
* @return array
*/
public function getParams();
Expand Down
21 changes: 5 additions & 16 deletions src/Phalcon/mvc/model/query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ class Builder implements \Phalcon\Mvc\Model\Query\BuilderInterface, \Phalcon\Di\

protected $_joins;


/**
* @deprecated Will be removed in version 4.0.0
*/
protected $_with;


Expand Down Expand Up @@ -195,27 +197,14 @@ public function from($models) {}
/**
* Add a model to take part of the query
*
* NOTE: The third parameter $with is deprecated and will be removed in future releases.
*
* <code>
* // 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",
* ]
* );
* </code>
*
* @param mixed $model
Expand Down
3 changes: 3 additions & 0 deletions src/Phalcon/validation/validator/Alnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
* Check for alphanumeric character(s)
*
* <code>
* use Phalcon\Validation;
* use Phalcon\Validation\Validator\Alnum as AlnumValidator;
*
* $validator = new Validation();
*
* $validator->add(
* "username",
* new AlnumValidator(
Expand Down
3 changes: 3 additions & 0 deletions src/Phalcon/validation/validator/Alpha.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
* Check for alphabetic character(s)
*
* <code>
* use Phalcon\Validation;
* use Phalcon\Validation\Validator\Alpha as AlphaValidator;
*
* $validator = new Validation();
*
* $validator->add(
* "username",
* new AlphaValidator(
Expand Down
3 changes: 3 additions & 0 deletions src/Phalcon/validation/validator/Between.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@
* For a value x, the test is passed if minimum<=x<=maximum.
*
* <code>
* use Phalcon\Validation;
* use Phalcon\Validation\Validator\Between;
*
* $validator = new Validation();
*
* $validator->add(
* "price",
* new Between(
Expand Down
3 changes: 3 additions & 0 deletions src/Phalcon/validation/validator/Callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
* Calls user function for validation
*
* <code>
* use Phalcon\Validation;
* use Phalcon\Validation\Validator\Callback as CallbackValidator;
* use Phalcon\Validation\Validator\Numericality as NumericalityValidator;
*
* $validator = new Validation();
*
* $validator->add(
* ["user", "admin"],
* new CallbackValidator(
Expand Down
3 changes: 3 additions & 0 deletions src/Phalcon/validation/validator/Confirmation.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
* Checks that two values have the same value
*
* <code>
* use Phalcon\Validation;
* use Phalcon\Validation\Validator\Confirmation;
*
* $validator = new Validation();
*
* $validator->add(
* "password",
* new Confirmation(
Expand Down
3 changes: 3 additions & 0 deletions src/Phalcon/validation/validator/CreditCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
* Checks if a value has a valid credit card number
*
* <code>
* use Phalcon\Validation;
* use Phalcon\Validation\Validator\CreditCard as CreditCardValidator;
*
* $validator = new Validation();
*
* $validator->add(
* "creditCard",
* new CreditCardValidator(
Expand Down
3 changes: 3 additions & 0 deletions src/Phalcon/validation/validator/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
* Checks if a value is a valid date
*
* <code>
* use Phalcon\Validation;
* use Phalcon\Validation\Validator\Date as DateValidator;
*
* $validator = new Validation();
*
* $validator->add(
* "date",
* new DateValidator(
Expand Down
3 changes: 3 additions & 0 deletions src/Phalcon/validation/validator/Digit.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
* Check for numeric character(s)
*
* <code>
* use Phalcon\Validation;
* use Phalcon\Validation\Validator\Digit as DigitValidator;
*
* $validator = new Validation();
*
* $validator->add(
* "height",
* new DigitValidator(
Expand Down
3 changes: 3 additions & 0 deletions src/Phalcon/validation/validator/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
* Checks if a value has a correct e-mail format
*
* <code>
* use Phalcon\Validation;
* use Phalcon\Validation\Validator\Email as EmailValidator;
*
* $validator = new Validation();
*
* $validator->add(
* "email",
* new EmailValidator(
Expand Down
5 changes: 4 additions & 1 deletion src/Phalcon/validation/validator/ExclusionIn.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
* Check if a value is not included into a list of values
*
* <code>
* use Phalcon\Validation;
* use Phalcon\Validation\Validator\ExclusionIn;
*
* $validator = new Validation();
*
* $validator->add(
* "status",
* new ExclusionIn(
Expand All @@ -32,7 +35,7 @@
* [
* "message" => [
* "status" => "The status must not be A or B",
* "type" => "The type must not be 1 or "'
* "type" => "The type must not be 1 or "
* ],
* "domain" => [
* "status" => [
Expand Down
Loading

0 comments on commit 8eb9574

Please sign in to comment.