従来のフレームワークと比較してメモリ消費量とCPU使用率が少ない
モジュール、コンポーネント、モデル、ビュー、コントローラ
依存するサービスの注入と配置において、DI自体がコンテナとして機能します。
RESTアプリケーションを構築するには、MicroアプリケーションやFull stackアプリケーションを利用することができます。 さらに、強力なHTTPヘルパーが利用できます。
PSR-4に準拠した、PHPクラスのオートローディングの仕組みを提供します。
Phalcon\Mvc\Routerは高度なルーティング機能を提供します。
Object Relational Mapping
The powerful and secure Phalcon Query Language, PHQL
Object Document Mapping for MongoDB
Transactions in Phalcon allows to keep the data integrity safe.
Improve your performance with many of the backend caches that Phalcon provides
A powerful ORM is provided by Phalcon allowing you to manipulate database records as classes and objects. MySQL, PostgreSQL and SQLite are supported out of the box.
use Phalcon\Mvc\Model;
class Robots extends Model
{
public $id;
public $name;
public function initialize()
{
$this->hasMany('id', 'RobotsParts', 'robots_id');
}
}
Views represent the user interface of your application
A template engine inspired by Jinja but built in C for PHP
Translate your applications to many languages easily
Easily create HTML forms
Flash messages are used to notify the user about the state of actions.
Views represent the user interface of your application. Views are often HTML files with embedded PHP code that perform tasks related solely to the presentation of the data. Views handle the job of providing data to the web browser or other tool that is used to make requests from your application.
<html>
<body>
<div class='top'><?php $this->partial('shared/ad_banner'); ?></div>
<div class='content'>
<h1>Robots</h1>
<p>Check out our specials for robots:</p>
...
</div>
<div class='footer'><?php $this->partial('shared/footer'); ?></div>
</body>
</html>
Access Control List allows users to access the modules they're authorized to
Connect, store and retrieve data from many database systems at the same time
Encrypt/Decrypt important data to keep them safe from unauthorized third-parties
Extend the most of the framework components by setting 'hook points'. Create your own events and make your application more flexible and powerful
Use the built-in queueing system in Phalcon to schedule jobs and reduce the load of your web server
This is how you can built the access control list (ACL):
use Phalcon\Acl;
use Phalcon\Acl\Role;
use Phalcon\Acl\Adapter\Memory as AclList;
// ACLオブジェクトを作る
$acl = new AclList();
// The default action is DENY access
$acl->setDefaultAction(Acl::DENY);
// Register two roles, Users is registered users
// and guests are users without a defined identity
$roles = array(
'users' => new Role('Users'),
'guests' => new Role('Guests')
);
foreach ($roles as $role) {
$acl->addRole($role);
}
Watch the demo video
Community contributions in Extensions, Plugins, Adapters, VM, examples, source code... and more