Internationalization

Phalcon is written in C as an extension for PHP. There is a PECL extension that offers internationalization functions to PHP applications called intl. Starting from PHP 5.4/5.5 this extension is bundled with PHP. Its documentation can be found in the pages of the official PHP manual. Phalcon does not offer this functionality, since creating such a component would be replicating existing code. In the examples below, we will show you how to implement the intl extension’s functionality into Phalco

Di::remove

public remove (mixed $name) Removes a service in the services container It also removes any shared instance created for the service

Logger\Adapter::commit

public commit () Commits the internal transaction

Http\Response

implements Phalcon\Http\ResponseInterface, Phalcon\Di\InjectionAwareInterface Source on GitHub 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("<html><body>Hello</body></html>"); $response->send(); Methods public __

Forms\Element\Numeric::render

public render ([array $attributes]) Renders the element widget returning html

Mvc\View::LEVEL_BEFORE_TEMPLATE

integer LEVEL_BEFORE_TEMPLATE

Mvc\Collection::validationHasFailed

public validationHasFailed () 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(array( 'field' => 'status', 'domain' => array('A', 'I') ))); if (this->validationHasFailed() == true) { return false; } } }

Assets\Manager::addInlineCss

public addInlineCss (mixed $content, [mixed $filter], [mixed $attributes]) Adds an inline Css to the ‘css’ collection

Acl\Adapter\Memory::addRole

public addRole (RoleInterface | string $role, [array | string $accessInherits]) 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'); $acl->addRole('administrator', 'consultant');

Mvc\Model\Criteria::having

public having (mixed $having) Adds the having clause to the criteria