PageRenderTime 74ms CodeModel.GetById 25ms RepoModel.GetById 1ms app.codeStats 1ms

/ide/0.4.1/inspector.php

https://github.com/AntonShevchuk/phalcon-devtools
PHP | 9456 lines | 2086 code | 1126 blank | 6244 comment | 1 complexity | 6dd91d7132b118989ed483e257bd491f MD5 | raw file
Possible License(s): BSD-3-Clause, MIT

Large files files are truncated, but you can click here to view the full file

  1. <?php if(!extension_loaded("phalcon")){
  2. /**
  3. * Phalcon_Acl
  4. *
  5. * This component allows to manage ACL lists. An access control list (ACL) is a list
  6. * of permissions attached to an object. An ACL specifies which users or system processes
  7. * are granted access to objects, as well as what operations are allowed on given objects.
  8. *
  9. *<code>
  10. *$acl = new Phalcon_Acl('Memory');
  11. *
  12. * //Default action is deny access
  13. *$acl->setDefaultAction(Phalcon_Acl::DENY);
  14. *
  15. * //Create some roles
  16. *$roleAdmins = new Phalcon_Acl_Role('Administrators', 'Super-User role');
  17. *$roleGuests = new Phalcon_Acl_Role('Guests');
  18. *
  19. * //Add "Guests" role to acl
  20. *acl->addRole($roleGuests);
  21. *
  22. * //Add "Designers" role to acl
  23. *$acl->addRole('Designers'));
  24. *
  25. * //Define the "Customers" resource
  26. *$customersResource = new Phalcon_Acl_Resource('Customers', 'Customers management');
  27. *
  28. * //Add "customers" resource with a couple of operations
  29. *$acl->addResource($customersResource, 'search');
  30. *$acl->addResource($customersResource, array('create', 'update'));
  31. *
  32. * //Set access level for roles into resources
  33. *$acl->allow('Guests', 'Customers', 'search');
  34. *$acl->allow('Guests', 'Customers', 'create');
  35. *$acl->deny('Guests', 'Customers', 'update');
  36. *
  37. * //Check whether role has access to the operations
  38. *$acl->isAllowed('Guests', 'Customers', 'edit') //Returns 0
  39. *$acl->isAllowed('Guests', 'Customers', 'search'); //Returns 1
  40. *$acl->isAllowed('Guests', 'Customers', 'create'); //Returns 1
  41. *</code>
  42. */
  43. class Phalcon_Acl
  44. {
  45. const ALLOW = 1;
  46. const DENY = 0;
  47. /**
  48. * Phalcon_Acl Constructor
  49. *
  50. * @param string $adapterName
  51. * @param array $options
  52. */
  53. public function __construct($adapterName='Memory', $options=array ()){
  54. }
  55. /**
  56. * Pass any call to the internal adapter object
  57. *
  58. * @param string $method
  59. * @param array $arguments
  60. * @return mixed
  61. */
  62. public function __call($method, $arguments=array ()){
  63. }
  64. }
  65. /**
  66. * Phalcon_Cache
  67. *
  68. * Phalcon_Cache can be used to cache output fragments to improve performance
  69. *
  70. *<code>
  71. * //Cache the file for 2 days
  72. *$frontendOptions = array(
  73. * 'lifetime' => 172800
  74. *);
  75. *
  76. * //Set the cache directory
  77. *$backendOptions = array(
  78. * 'cacheDir' => '../app/cache/'
  79. *);
  80. *
  81. *$cache = Phalcon_Cache::factory('Output', 'File', $frontendOptions, $backendOptions);
  82. *
  83. *$content = $cache->start('my-cache');
  84. *if($content===null){
  85. * echo time();
  86. * $cache->save();
  87. *} else {
  88. * echo $content;
  89. *}
  90. *</code>
  91. */
  92. class Phalcon_Cache
  93. {
  94. /**
  95. * Factories different caches backends from its adapters
  96. *
  97. * @param string $frontendAdapter
  98. * @param string $backendAdapter
  99. * @param array $frontendOptions
  100. * @param array $backendOptions
  101. * @return Phalcon_Cache_Backend_File
  102. * @static
  103. */
  104. public static function factory($frontendAdapter, $backendAdapter, $frontendOptions=array (), $backendOptions=array ()){
  105. }
  106. }
  107. /**
  108. * Phalcon_Config
  109. *
  110. * Phalcon_Config is designed to simplify the access to, and the use of, configuration data within applications.
  111. * It provides a nested object property based user interface for accessing this configuration data within
  112. * application code.
  113. *
  114. * <code>$config = new Phalcon_Config(array(
  115. * "database" => array(
  116. * "adapter" => "Mysql",
  117. * "host" => "localhost",
  118. * "username" => "scott",
  119. * "password" => "cheetah",
  120. * "name" => "test_db"
  121. * ),
  122. * "phalcon" => array(
  123. * "controllersDir" => "../app/controllers/",
  124. * "modelsDir" => "../app/models/",
  125. * "viewsDir" => "../app/views/"
  126. * )
  127. * ));</code>
  128. *
  129. */
  130. class Phalcon_Config
  131. {
  132. /**
  133. * Phalcon_Config constructor
  134. *
  135. * @param array $arrayConfig
  136. * @return Phalcon_Config
  137. */
  138. public function __construct($arrayConfig=array ()){
  139. }
  140. }
  141. /**
  142. * Phalcon_Controller
  143. *
  144. * Every application controller should extend this class that encapsulates all the controller functionality
  145. *
  146. * The controllers provide the “flow” between models and views. Controllers are responsible
  147. * for processing the incoming requests from the web browser, interrogating the models for data,
  148. * and passing that data on to the views for presentation.
  149. *
  150. *<code>
  151. *
  152. *
  153. * class PeopleController extends Phalcon_Controller
  154. *{
  155. *
  156. * //This action will be executed by default
  157. * public function indexAction()
  158. * {
  159. *
  160. * }
  161. *
  162. * public function findAction()
  163. * {
  164. *
  165. * }
  166. *
  167. * public function saveAction()
  168. * {
  169. * //Forwards flow to the index action
  170. * return $this->_forward('people/index');
  171. * }
  172. *
  173. * //This action will be executed when a non existent action is requested
  174. * public function notFoundAction()
  175. * {
  176. *
  177. * }
  178. *
  179. * }
  180. *
  181. *</code>
  182. */
  183. class Phalcon_Controller
  184. {
  185. /**
  186. * @var Phalcon_Dispatcher
  187. */
  188. public $dispatcher;
  189. /**
  190. * @var Phalcon_Request
  191. */
  192. public $request;
  193. /**
  194. * @var Phalcon_Response
  195. */
  196. public $response;
  197. /**
  198. * @var Phalcon_View
  199. */
  200. public $view;
  201. /**
  202. * @var Phalcon_Model_Manager
  203. */
  204. public $model;
  205. /**
  206. * Constructor for Phalcon_Controller
  207. *
  208. * @param Phalcon_Dispatcher $dispatcher
  209. * @param Phalcon_Request $request
  210. * @param Phalcon_Response $response
  211. * @param Phalcon_View $view
  212. * @param Phalcon_Model_Manager $model
  213. */
  214. final public function __construct($dispatcher, $request, $response, $view=NULL, $model=NULL){
  215. }
  216. /**
  217. * Forwards execution flow to another controller/action.
  218. *
  219. * @param string $uri
  220. */
  221. protected function _forward($uri){
  222. }
  223. /**
  224. * Returns a param from the dispatching params
  225. *
  226. * @param mixed $index
  227. */
  228. protected function _getParam($index){
  229. }
  230. /**
  231. * Set a dispatching parameter
  232. *
  233. * @param mixed $index
  234. * @param mixed $value
  235. */
  236. protected function _setParam($index, $value){
  237. }
  238. /**
  239. * Magic method __get
  240. *
  241. * @param string $propertyName
  242. */
  243. public function __get($propertyName){
  244. }
  245. }
  246. /**
  247. * Phalcon_Db
  248. *
  249. * Phalcon_Db and its related classes provide a simple SQL database interface for Phalcon Framework.
  250. * The Phalcon_Db is the basic class you use to connect your PHP application to an RDBMS.
  251. * There is a different adapter class for each brand of RDBMS.
  252. *
  253. * This component is intended to lower level database operations. If you want to interact with databases using
  254. * high level abstraction use Phalcon_Model.
  255. *
  256. * Phalcon_Db is an abstract class. You only can use it with a database adapter like Phalcon_Db_Adapter_Mysql
  257. *
  258. * <code>
  259. *
  260. *$config = new stdClass();
  261. *$config->host = 'localhost';
  262. *$config->username = 'machine';
  263. *$config->password = 'sigma';
  264. *$config->name = 'swarm';
  265. *
  266. *try {
  267. *
  268. * $connection = Phalcon_Db::factory('Mysql', $config);
  269. *
  270. * $result = $connection->query("SELECT * FROM robots LIMIT 5");
  271. * $result->setFetchMode(Phalcon_Db::DB_NUM);
  272. * while($robot = $result->fetchArray()){
  273. * print_r($robot);
  274. * }
  275. *
  276. *} catch(Phalcon_Db_Exception $e){
  277. * echo $e->getMessage(), PHP_EOL;
  278. *}
  279. *
  280. * </code>
  281. */
  282. abstract class Phalcon_Db
  283. {
  284. const DB_ASSOC = 1;
  285. const DB_BOTH = 2;
  286. const DB_NUM = 3;
  287. /**
  288. * Phalcon_Db constructor, this method should not be called directly. Use Phalcon_Db::factory instead
  289. *
  290. * @param stdClass $descriptor
  291. */
  292. protected function __construct($descriptor){
  293. }
  294. /**
  295. * Sets a logger class to log all SQL operations sent to database server
  296. *
  297. * @param Phalcon_Logger $logger
  298. */
  299. public function setLogger($logger){
  300. }
  301. /**
  302. * Returns the active logger
  303. *
  304. * @return Phalcon_Logger
  305. */
  306. public function getLogger(){
  307. }
  308. /**
  309. * Sends arbitrary text to a related logger in the instance
  310. *
  311. * @param string $sqlStatement
  312. * @param int $type
  313. */
  314. protected function log($sqlStatement, $type){
  315. }
  316. /**
  317. * Sets a database profiler to the connection
  318. *
  319. * @param Phalcon_Db_Profiler $profiler
  320. */
  321. public function setProfiler($profiler){
  322. }
  323. /**
  324. * Returns the first row in a SQL query result
  325. *
  326. * <code>
  327. * //Getting first robot
  328. * $robot = $connection->fecthOne("SELECT * FROM robots");
  329. * print_r($robot);
  330. *
  331. * //Getting first robot with associative indexes only
  332. * $robot = $connection->fecthOne("SELECT * FROM robots", Phalcon_Db_Result::DB_ASSOC);
  333. * print_r($robot);
  334. * </code>
  335. *
  336. * @param string $sqlQuery
  337. * @param int $fetchMode
  338. * @return array
  339. */
  340. public function fetchOne($sqlQuery, $fetchMode=2){
  341. }
  342. /**
  343. * Dumps the complete result of a query into an array
  344. *
  345. * <code>
  346. * //Getting all robots
  347. * $robots = $connection->fetchAll("SELECT * FROM robots");
  348. * foreach($robots as $robot){
  349. * print_r($robot);
  350. * }
  351. *
  352. * //Getting all robots with associative indexes only
  353. * $robots = $connection->fetchAll("SELECT * FROM robots", Phalcon_Db_Result::DB_ASSOC);
  354. * foreach($robots as $robot){
  355. * print_r($robot);
  356. * }
  357. * </code>
  358. *
  359. * @param string $sqlQuery
  360. * @param int $fetchMode
  361. * @return array
  362. */
  363. public function fetchAll($sqlQuery, $fetchMode=2){
  364. }
  365. /**
  366. * Inserts data into a table using custom RBDM SQL syntax
  367. *
  368. * <code>
  369. * //Inserting a new robot
  370. * $success = $connection->insert(
  371. * "robots",
  372. * array("Astro Boy", 1952),
  373. * array("name", "year")
  374. * );
  375. *
  376. * //Next SQL sentence is sent to the database system
  377. * INSERT INTO `robots` (`name`, `year`) VALUES ("Astro boy", 1952);
  378. * </code>
  379. *
  380. * @param string $table
  381. * @param array $values
  382. * @param array $fields
  383. * @param boolean $automaticQuotes
  384. * @return boolean
  385. */
  386. public function insert($table, $values, $fields=NULL, $automaticQuotes=false){
  387. }
  388. /**
  389. * Updates data on a table using custom RBDM SQL syntax
  390. *
  391. * <code>
  392. * //Updating existing robot
  393. * $success = $connection->update(
  394. * "robots",
  395. * array("name")
  396. * array("New Astro Boy"),
  397. * "id = 101"
  398. * );
  399. *
  400. * //Next SQL sentence is sent to the database system
  401. * UPDATE `robots` SET `name` = "Astro boy" WHERE id = 101
  402. * </code>
  403. *
  404. * @param string $table
  405. * @param array $fields
  406. * @param array $values
  407. * @param string $whereCondition
  408. * @param boolean $automaticQuotes
  409. * @return boolean
  410. */
  411. public function update($table, $fields, $values, $whereCondition=NULL, $automaticQuotes=false){
  412. }
  413. /**
  414. * Deletes data from a table using custom RBDM SQL syntax
  415. *
  416. * <code>
  417. * //Deleting existing robot
  418. * $success = $connection->delete(
  419. * "robots",
  420. * "id = 101"
  421. * );
  422. *
  423. * //Next SQL sentence is generated
  424. * DELETE FROM `robots` WHERE id = 101
  425. * </code>
  426. *
  427. * @param string $table
  428. * @param string $whereCondition
  429. * @return boolean
  430. */
  431. public function delete($table, $whereCondition=''){
  432. }
  433. /**
  434. * Starts a transaction in the connection
  435. *
  436. * @return boolean
  437. */
  438. public function begin(){
  439. }
  440. /**
  441. * Rollbacks the active transaction in the connection
  442. *
  443. * @return boolean
  444. */
  445. public function rollback(){
  446. }
  447. /**
  448. * Commits the active transaction in the connection
  449. *
  450. * @return boolean
  451. */
  452. public function commit(){
  453. }
  454. /**
  455. * Manually sets a "under transaction" state for the connection
  456. *
  457. * @param boolean $underTransaction
  458. */
  459. protected function setUnderTransaction($underTransaction){
  460. }
  461. /**
  462. * Checks whether connection is under database transaction
  463. *
  464. * @return boolean
  465. */
  466. public function isUnderTransaction(){
  467. }
  468. /**
  469. * Checks whether connection have auto commit
  470. *
  471. * @return boolean
  472. */
  473. public function getHaveAutoCommit(){
  474. }
  475. /**
  476. * Returns database name in the internal connection
  477. *
  478. * @return string
  479. */
  480. public function getDatabaseName(){
  481. }
  482. /**
  483. * Returns active schema name in the internal connection
  484. *
  485. * @return string
  486. */
  487. public function getDefaultSchema(){
  488. }
  489. /**
  490. * Returns the username which has connected to the database
  491. *
  492. * @return string
  493. */
  494. public function getUsername(){
  495. }
  496. /**
  497. * Returns the username which has connected to the database
  498. *
  499. * @return string
  500. */
  501. public function getHostName(){
  502. }
  503. /**
  504. * This method is executed before every SQL statement sent to the database system
  505. *
  506. * @param string $sqlStatement
  507. */
  508. protected function _beforeQuery($sqlStatement){
  509. }
  510. /**
  511. * This method is executed after every SQL statement sent to the database system
  512. *
  513. * @param string $sqlStatement
  514. */
  515. protected function _afterQuery($sqlStatement){
  516. }
  517. /**
  518. * Instantiates Phalcon_Db adapter using given parameters
  519. *
  520. * @param string $adapterName
  521. * @param stdClass $options
  522. * @return Phalcon_Db_Adapter_Mysql|Phalcon_Db_Adapter_Postgresql
  523. */
  524. public static function factory($adapterName, $options){
  525. }
  526. }
  527. /**
  528. * Phalcon_Dispatcher
  529. *
  530. * Dispatching is the process of taking the request object, extracting the module name,
  531. * controller name, action name, and optional parameters contained in it, and then
  532. * instantiating a controller and calling an action of that controller.
  533. *
  534. * <code>
  535. *
  536. *$dispatcher = new Phalcon_Dispatcher();
  537. *
  538. *$request = Phalcon_Request::getInstance();
  539. *$response = Phalcon_Response::getInstance();
  540. *
  541. *$dispatcher->setBasePath('./');
  542. *$dispatcher->setControllersDir('tests/controllers/');
  543. *
  544. *$dispatcher->setControllerName('posts');
  545. *$dispatcher->setActionName('index');
  546. *$dispatcher->setParams(array());
  547. *$controller = $dispatcher->dispatch($request, $response);
  548. *
  549. *</code>
  550. */
  551. class Phalcon_Dispatcher
  552. {
  553. /**
  554. * Sets default controllers directory. Depending of your platform, always add a trailing slash or backslash
  555. *
  556. * @param string $controllersDir
  557. */
  558. public function setControllersDir($controllersDir){
  559. }
  560. /**
  561. * Gets active controllers directory
  562. *
  563. * @return string
  564. */
  565. public function getControllersDir(){
  566. }
  567. /**
  568. * Sets base path for controllers dir. Depending of your platform, always add a trailing slash or backslash
  569. *
  570. * @param string $basePath
  571. */
  572. public function setBasePath($basePath){
  573. }
  574. /**
  575. * Gets base path for controllers dir
  576. *
  577. * @return string
  578. */
  579. public function getBasePath(){
  580. }
  581. /**
  582. * Sets the default controller name
  583. *
  584. * @param string $controllerName
  585. */
  586. public function setDefaultController($controllerName){
  587. }
  588. /**
  589. * Sets the default action name
  590. *
  591. * @param string $actionName
  592. */
  593. public function setDefaultAction($actionName){
  594. }
  595. /**
  596. * Sets the controller name to be dispatched
  597. *
  598. * @param string $controllerName
  599. */
  600. public function setControllerName($controllerName){
  601. }
  602. /**
  603. * Gets last dispatched controller name
  604. *
  605. * @return string
  606. */
  607. public function getControllerName(){
  608. }
  609. /**
  610. * Sets the action name to be dispatched
  611. *
  612. * @param string $actionName
  613. */
  614. public function setActionName($actionName){
  615. }
  616. /**
  617. * Gets last dispatched action name
  618. *
  619. * @return string
  620. */
  621. public function getActionName(){
  622. }
  623. /**
  624. * Sets action params to be dispatched
  625. *
  626. * @param array $params
  627. */
  628. public function setParams($params){
  629. }
  630. /**
  631. * Gets action params
  632. *
  633. * @return array
  634. */
  635. public function getParams(){
  636. }
  637. /**
  638. * Set a param by its name or numeric index
  639. *
  640. * @param mixed $param
  641. * @param mixed $value
  642. */
  643. public function setParam($param, $value){
  644. }
  645. /**
  646. * Gets a param by its name or numeric index
  647. *
  648. * @param mixed $param
  649. * @return mixed
  650. */
  651. public function getParam($param){
  652. }
  653. /**
  654. * Dispatches a controller action taking into account the routing parameters
  655. *
  656. * @param Phalcon_Request $request
  657. * @param Phalcon_Response $response
  658. * @param Phalcon_View $view
  659. * @param Phalcon_Model_Manager $model
  660. * @return Phalcon_Controller
  661. */
  662. public function dispatch($request, $response, $view=NULL, $model=NULL){
  663. }
  664. /**
  665. * Throws an internal exception
  666. *
  667. * @param Phalcon_Response $response
  668. * @param string $message
  669. */
  670. protected function _throwDispatchException($response, $message){
  671. }
  672. /**
  673. * Routes to a controller/action using a string or array uri
  674. *
  675. * @param string $uri
  676. */
  677. public function forward($uri){
  678. }
  679. /**
  680. * Checks if the dispatch loop is finished or have more pendent controller to disptach
  681. *
  682. * @return boolean
  683. */
  684. public function isFinished(){
  685. }
  686. /**
  687. * Returns all instantiated controllers whitin the dispatcher
  688. *
  689. * @return array
  690. */
  691. public function getControllers(){
  692. }
  693. /**
  694. * Returns last dispatched controller
  695. *
  696. * @return Phalcon_Controller
  697. */
  698. public function getLastController(){
  699. }
  700. /**
  701. * Returns value returned by last dispacthed action
  702. *
  703. * @return mixed
  704. */
  705. public function getReturnedValue(){
  706. }
  707. }
  708. /**
  709. * Phalcon_Exception
  710. *
  711. * All framework exceptions should use this exception
  712. */
  713. class Phalcon_Exception extends Exception
  714. {
  715. final private function __clone(){
  716. }
  717. public function __construct($message, $code, $previous){
  718. }
  719. final public function getMessage(){
  720. }
  721. final public function getCode(){
  722. }
  723. final public function getFile(){
  724. }
  725. final public function getLine(){
  726. }
  727. final public function getTrace(){
  728. }
  729. final public function getPrevious(){
  730. }
  731. final public function getTraceAsString(){
  732. }
  733. public function __toString(){
  734. }
  735. }
  736. /**
  737. * Phalcon_Filter
  738. *
  739. * The Phalcon_Filter component provides a set of commonly needed data filters. It provides
  740. * object oriented wrappers to the php filter extension
  741. *
  742. *<code>
  743. *$filter = new Phalcon_Filter();
  744. *$filter->sanitize("some(one)@exa\\mple.com", "email"); // returns "someone@example.com"
  745. *$filter->sanitize("hello<<", "string"); // returns "hello"
  746. *$filter->sanitize("!100a019", "int"); // returns "100019"
  747. *$filter->sanitize("!100a019.01a", "float"); // returns "100019.01"
  748. *</code>
  749. *
  750. */
  751. class Phalcon_Filter
  752. {
  753. /**
  754. * Sanizites a value with a specified single or set of filters
  755. *
  756. * @param mixed $value
  757. * @param mixed $filters
  758. * @param boolean $silent
  759. * @return mixed
  760. */
  761. public function sanitize($value, $filters, $silent=false){
  762. }
  763. /**
  764. * Filters a value with a specified single or set of filters
  765. *
  766. * @param mixed $value
  767. * @param array $filters
  768. * @param boolean $silent
  769. * @return mixed
  770. */
  771. public function filter($value, $filters, $silent=false){
  772. }
  773. /**
  774. * Sanitize and Filter a value with a specified single or set of filters
  775. *
  776. * @param mixed $value
  777. * @param array $filters
  778. * @return mixed
  779. */
  780. public function sanitizeAndFilter($value, $filters){
  781. }
  782. /**
  783. * Internal sanizite wrapper to filter_var
  784. *
  785. * @param mixed $value
  786. * @param string $filter
  787. * @param boolean $silent
  788. * @return mixed
  789. */
  790. protected function _sanitize($value, $filter, $silent=false){
  791. }
  792. /**
  793. * Internal filter function
  794. *
  795. * @param mixed $value
  796. * @param string $filter
  797. * @param boolean $silent
  798. * @return mixed
  799. */
  800. protected function _filter($value, $filter, $silent=false){
  801. }
  802. }
  803. /**
  804. * Phalcon_Flash
  805. *
  806. * Shows HTML notifications related to different circumstances. Classes can be stylized using CSS
  807. *
  808. *<code>
  809. *Phalcon_Flash::success("The record was successfully deleted");
  810. *Phalcon_Flash::error("Cannot open the file");
  811. *Phalcon_Flash::error("Cannot open the file", "alert alert-error");
  812. *</code>
  813. */
  814. abstract class Phalcon_Flash
  815. {
  816. private static function _showMessage($message, $classes){
  817. }
  818. /**
  819. * Shows a HTML error message
  820. *
  821. * <code>Phalcon_Flash::error('This is an error'); </code>
  822. *
  823. * @param string $message
  824. * @param string $classes
  825. * @return string
  826. */
  827. public static function error($message, $classes='errorMessage'){
  828. }
  829. /**
  830. * Shows a HTML notice/information message
  831. *
  832. * <code>Phalcon_Flash::notice('This is an information'); </code>
  833. *
  834. * @param string $message
  835. * @param string $classes
  836. * @return string
  837. */
  838. public static function notice($message, $classes='noticeMessage'){
  839. }
  840. /**
  841. * Shows a HTML success message
  842. *
  843. * <code>Phalcon_Flash::success('The process was finished successfully'); </code>
  844. *
  845. * @param string $message
  846. * @param string $classes
  847. * @return string
  848. */
  849. public static function success($message, $classes='successMessage'){
  850. }
  851. /**
  852. * Shows a HTML warning message
  853. *
  854. * <code>Phalcon_Flash::warning('Hey, this is important'); </code>
  855. * <code>Phalcon_Flash::warning('Hey, this is important', 'alert alert-warning'); </code>
  856. *
  857. * @param string $message
  858. * @param string $classes
  859. * @return string
  860. */
  861. public static function warning($message, $classes='warningMessage'){
  862. }
  863. }
  864. /**
  865. * Phalcon_Loader
  866. *
  867. * This component helps to load your project classes automatically based on some conventions
  868. *
  869. *<code>
  870. * //Creates the autoloader
  871. * $loader = new Phalcon_Loader();
  872. *
  873. * //Register some namespaces
  874. * $loader->registerNamespaces(array(
  875. * 'Example\\Base' => 'vendor/example/base/',
  876. * 'Example\\Adapter' => 'vendor/example/adapter/'
  877. * 'Example' => 'vendor/example/'
  878. * ));
  879. *
  880. * //register autoloader
  881. * $loader->register();
  882. *
  883. * //Requiring class will automatically include file vendor/example/adapter/Some.php
  884. * $adapter = Example\Adapter\Some();
  885. *</code>
  886. */
  887. class Phalcon_Loader
  888. {
  889. /**
  890. * Register namespaces and their related directories
  891. *
  892. * @param array $namespaces
  893. */
  894. public function registerNamespaces($namespaces){
  895. }
  896. /**
  897. * Register directories on which "not found" classes could be found
  898. *
  899. * @param array $directories
  900. */
  901. public function registerDirs($directories){
  902. }
  903. /**
  904. * Register classes and their locations
  905. *
  906. * @param array $directories
  907. */
  908. public function registerClasses($classes){
  909. }
  910. /**
  911. * Register the autoload method
  912. */
  913. public function register(){
  914. }
  915. /**
  916. * Makes the work of autoload registered classes
  917. *
  918. * @param string $className
  919. */
  920. public function autoLoad($className){
  921. }
  922. }
  923. /**
  924. * Phalcon_Logger
  925. *
  926. * Phalcon_Logger is a component whose purpose is to create logs using
  927. * different backends via adapters, generating options, formats and filters
  928. * also implementing transactions.
  929. *
  930. *<code>
  931. *$logger = new Phalcon_Logger("File", "app/logs/test.log");
  932. *$logger->log("This is a message");
  933. *$logger->log("This is an error", Phalcon_Logger::ERROR);
  934. *$logger->error("This is another error");
  935. *$logger->close();
  936. * </code>
  937. */
  938. class Phalcon_Logger
  939. {
  940. const SPECIAL = 9;
  941. const CUSTOM = 8;
  942. const DEBUG = 7;
  943. const INFO = 6;
  944. const NOTICE = 5;
  945. const WARNING = 4;
  946. const ERROR = 3;
  947. const ALERT = 2;
  948. const CRITICAL = 1;
  949. const EMERGENCE = 0;
  950. /**
  951. * Phalcon_Logger constructor
  952. *
  953. * @param string $adapter
  954. * @param string $name
  955. * @param array $options
  956. */
  957. public function __construct($adapter='File', $name=NULL, $options=array ()){
  958. }
  959. /**
  960. * Sends/Writes a message to the log
  961. *
  962. * @param string $message
  963. * @param ing $type
  964. */
  965. public function log($message, $type=7){
  966. }
  967. /**
  968. * Sends/Writes a debug message to the log
  969. *
  970. * @param string $message
  971. * @param ing $type
  972. */
  973. public function debug($message){
  974. }
  975. /**
  976. * Sends/Writes an error message to the log
  977. *
  978. * @param string $message
  979. * @param ing $type
  980. */
  981. public function error($message){
  982. }
  983. /**
  984. * Sends/Writes an info message to the log
  985. *
  986. * @param string $message
  987. * @param ing $type
  988. */
  989. public function info($message){
  990. }
  991. /**
  992. * Sends/Writes a notice message to the log
  993. *
  994. * @param string $message
  995. * @param ing $type
  996. */
  997. public function notice($message){
  998. }
  999. /**
  1000. * Sends/Writes a warning message to the log
  1001. *
  1002. * @param string $message
  1003. * @param ing $type
  1004. */
  1005. public function warning($message){
  1006. }
  1007. /**
  1008. * Sends/Writes an alert message to the log
  1009. *
  1010. * @param string $message
  1011. * @param ing $type
  1012. */
  1013. public function alert($message){
  1014. }
  1015. /**
  1016. * Pass any call to the internal adapter object
  1017. *
  1018. * @param string $method
  1019. * @param array $arguments
  1020. * @return mixed
  1021. */
  1022. public function __call($method, $arguments=array ()){
  1023. }
  1024. }
  1025. /**
  1026. * Phalcon_Paginator
  1027. *
  1028. * Phalcon_Paginator is designed to simplify building of pagination on views
  1029. *
  1030. * <code>
  1031. *
  1032. *
  1033. * //Use an alias for Phalcon_Tag
  1034. * use Tag as Phalcon_Tag;
  1035. *
  1036. * //Gets the active page number
  1037. * $numberPage = (int) $_GET['page'];
  1038. *
  1039. * //Create a Model paginator
  1040. * $paginator = Phalcon_Paginator::factory('Model', array(
  1041. * 'data' => $robots,
  1042. * 'limit' => 10,
  1043. * 'page' => $numberPage
  1044. * ));
  1045. *
  1046. * //Get the active page
  1047. * $page = $paginator->getPaginate();
  1048. *
  1049. *?>
  1050. *
  1051. *<table>
  1052. * <tr>
  1053. * <th>Id</th>
  1054. * <th>Name</th>
  1055. * <th>Type</th>
  1056. * </tr>
  1057. * foreach($page->items as $item){ ?>
  1058. * <tr>
  1059. * <td> echo $item->id ?></td>
  1060. * <td> echo $item->name ?></td>
  1061. * <td> echo $item->type ?></td>
  1062. * </tr>
  1063. * } ?>
  1064. *</table>
  1065. *
  1066. *<table>
  1067. * <tr>
  1068. * <td><?= Tag::linkTo("robots/search", "First") ?></td>
  1069. * <td><?= Tag::linkTo("robots/search?page=".$page->before, "Previous") ?></td>
  1070. * <td><?= Tag::linkTo("robots/search?page=".$page->next, "Next") ?></td>
  1071. * <td><?= Tag::linkTo("robots/search?page=".$page->last, "Last") ?></td>
  1072. * <td> echo $page->current, "/", $page->total_pages ?></td>
  1073. * </tr>
  1074. * </table>
  1075. * </code>
  1076. *
  1077. */
  1078. abstract class Phalcon_Paginator
  1079. {
  1080. /**
  1081. * Factories a paginator adapter
  1082. *
  1083. * @param string $adapterName
  1084. * @param array $options
  1085. * @return Object
  1086. */
  1087. public static function factory($adapterName, $options=array ()){
  1088. }
  1089. }
  1090. /**
  1091. * Phalcon_Request
  1092. *
  1093. * <p>Encapsulates request information for easy and secure access from application controllers.</p>
  1094. *
  1095. * <p>The request object is a simple value object that is passed between the dispatcher and controller classes.
  1096. * It packages the HTTP request environment.</p>
  1097. *
  1098. * <code>
  1099. *$request = Phalcon_Request::getInstance();
  1100. *if ($request->isPost() == true) {
  1101. * if ($request->isAjax() == true) {
  1102. * echo 'Request was made using POST and AJAX';
  1103. * }
  1104. *}
  1105. * </code>
  1106. *
  1107. */
  1108. class Phalcon_Request
  1109. {
  1110. /**
  1111. * Gets the singleton instance of Phalcon_Request
  1112. *
  1113. * @return Phalcon_Request
  1114. */
  1115. public static function getInstance(){
  1116. }
  1117. /**
  1118. * Overwrites Phalcon_Filter object used to sanitize input data
  1119. *
  1120. *<code>
  1121. * $request->setFilter($myFilter);
  1122. *</code>
  1123. *
  1124. * @param Phalcon_Filter $filter
  1125. */
  1126. public function setFilter($filter){
  1127. }
  1128. /**
  1129. * Returns the active filter object used to sanitize input data
  1130. *
  1131. *<code>
  1132. * // returns "100019.01"
  1133. * echo $request->getFilter()->sanitize("!100a019.01a", "float");
  1134. *</code>
  1135. *
  1136. * @return Phalcon_Filter
  1137. */
  1138. protected function getFilter(){
  1139. }
  1140. /**
  1141. * Gets variable from $_POST superglobal applying filters if needed
  1142. *
  1143. *<code>
  1144. * //Returns value from $_POST["user_email"] without sanitizing
  1145. * $userEmail = $request->getPost("user_email");
  1146. *
  1147. * //Returns value from $_POST["user_email"] with sanitizing
  1148. * $userEmail = $request->getPost("user_email", "email");
  1149. *</code>
  1150. *
  1151. * @param string $name
  1152. * @param string|array $filters
  1153. * @return mixed
  1154. */
  1155. public function getPost($name, $filters=NULL){
  1156. }
  1157. /**
  1158. * Gets variable from $_GET superglobal applying filters if needed
  1159. *
  1160. *<code>
  1161. * //Returns value from $_GET["id"] without sanitizing
  1162. * $id = $request->getQuery("id");
  1163. *
  1164. * //Returns value from $_GET["id"] with sanitizing
  1165. * $id = $request->getQuery("id", "int");
  1166. *</code>
  1167. *
  1168. * @param string $name
  1169. * @param string|array $filters
  1170. * @return mixed
  1171. */
  1172. public function getQuery($name, $filters=NULL){
  1173. }
  1174. /**
  1175. * Gets variable from $_SERVER superglobal
  1176. *
  1177. * @param string $name
  1178. * @return mixed
  1179. */
  1180. public function getServer($name){
  1181. }
  1182. /**
  1183. * Checks whether $_POST superglobal has certain index
  1184. *
  1185. * @param string $name
  1186. * @return boolean
  1187. */
  1188. public function hasPost($name){
  1189. }
  1190. /**
  1191. * Checks whether $_SERVER superglobal has certain index
  1192. *
  1193. * @param string $name
  1194. * @return boolean
  1195. */
  1196. public function hasQuery($name){
  1197. }
  1198. /**
  1199. * Checks whether $_SERVER superglobal has certain index
  1200. *
  1201. * @param string $name
  1202. * @return mixed
  1203. */
  1204. public function hasServer($name){
  1205. }
  1206. /**
  1207. * Gets HTTP header from request data
  1208. *
  1209. * @param string $header
  1210. * @return string
  1211. */
  1212. public function getHeader($header){
  1213. }
  1214. /**
  1215. * Gets HTTP schema (http/https)
  1216. *
  1217. * @return string
  1218. */
  1219. public function getScheme(){
  1220. }
  1221. /**
  1222. * Checks whether request has been made using ajax
  1223. *
  1224. * @return boolean
  1225. */
  1226. public function isAjax(){
  1227. }
  1228. /**
  1229. * Checks whether request has been made using SOAP
  1230. *
  1231. * @return boolean
  1232. */
  1233. public function isSoapRequested(){
  1234. }
  1235. /**
  1236. * Checks whether request has been made using any secure layer
  1237. *
  1238. * @return boolean
  1239. */
  1240. public function isSecureRequest(){
  1241. }
  1242. /**
  1243. * Gets HTTP raws request body
  1244. *
  1245. * @return string
  1246. */
  1247. public function getRawBody(){
  1248. }
  1249. /**
  1250. * Gets active server address IP
  1251. *
  1252. * @return string
  1253. */
  1254. public function getServerAddress(){
  1255. }
  1256. /**
  1257. * Gets active server name
  1258. *
  1259. * @return string
  1260. */
  1261. public function getServerName(){
  1262. }
  1263. /**
  1264. * Gets information about schema, host and port used by the request
  1265. *
  1266. * @return string
  1267. */
  1268. public function getHttpHost(){
  1269. }
  1270. /**
  1271. * Gets most possibly client IPv4 Address. This methods search in $_SERVER['HTTP_X_FORWARDED_FOR'] and $_SERVER['REMOTE_ADDR']
  1272. *
  1273. * @return string
  1274. */
  1275. public function getClientAddress(){
  1276. }
  1277. /**
  1278. * Gets HTTP method which request has been made
  1279. *
  1280. * @return string
  1281. */
  1282. public function getMethod(){
  1283. }
  1284. /**
  1285. * Gets HTTP user agent used to made the request
  1286. *
  1287. * @return string
  1288. */
  1289. public function getUserAgent(){
  1290. }
  1291. /**
  1292. * Checks whether HTTP method is POST. if $_SERVER['REQUEST_METHOD']=='POST'
  1293. *
  1294. * @return boolean
  1295. */
  1296. public function isPost(){
  1297. }
  1298. /**
  1299. *
  1300. * Checks whether HTTP method is GET. if $_SERVER['REQUEST_METHOD']=='GET'
  1301. *
  1302. * @return boolean
  1303. */
  1304. public function isGet(){
  1305. }
  1306. /**
  1307. * Checks whether HTTP method is PUT. if $_SERVER['REQUEST_METHOD']=='PUT'
  1308. *
  1309. * @return boolean
  1310. */
  1311. public function isPut(){
  1312. }
  1313. /**
  1314. * Checks whether HTTP method is HEAD. if $_SERVER['REQUEST_METHOD']=='HEAD'
  1315. *
  1316. * @return boolean
  1317. */
  1318. public function isHead(){
  1319. }
  1320. /**
  1321. * Checks whether HTTP method is DELETE. if $_SERVER['REQUEST_METHOD']=='DELETE'
  1322. *
  1323. * @return boolean
  1324. */
  1325. public function isDelete(){
  1326. }
  1327. /**
  1328. * Checks whether HTTP method is OPTIONS. if $_SERVER['REQUEST_METHOD']=='OPTIONS'
  1329. *
  1330. * @return boolean
  1331. */
  1332. public function isOptions(){
  1333. }
  1334. /**
  1335. * Checks whether request include attached files
  1336. *
  1337. * @return boolean
  1338. */
  1339. public function hasFiles(){
  1340. }
  1341. /**
  1342. * Gets attached files as Phalcon_Request_File instances
  1343. *
  1344. * @return Phalcon_Request_File[]
  1345. */
  1346. public function getUploadedFiles(){
  1347. }
  1348. /**
  1349. * Gets web page that refers active request. ie: http://www.google.com
  1350. *
  1351. * @return string
  1352. */
  1353. public function getHTTPReferer(){
  1354. }
  1355. /**
  1356. * Process a request header and return an array of values with their qualities
  1357. *
  1358. * @param string $serverIndex
  1359. * @param string $name
  1360. * @return array
  1361. */
  1362. protected function _getQualityHeader($serverIndex, $name){
  1363. }
  1364. /**
  1365. * Process a request header and return the one with best quality
  1366. *
  1367. * @param array $qualityParts
  1368. * @param string $name
  1369. * @return string
  1370. */
  1371. protected function _getBestQuality($qualityParts, $name){
  1372. }
  1373. /**
  1374. * Gets array with mime/types and their quality accepted by the browser/client from $_SERVER['HTTP_ACCEPT']
  1375. *
  1376. * @return array
  1377. */
  1378. public function getAcceptableContent(){
  1379. }
  1380. /**
  1381. * Gets best mime/type accepted by the browser/client from $_SERVER['HTTP_ACCEPT']
  1382. *
  1383. * @return array
  1384. */
  1385. public function getBestAccept(){
  1386. }
  1387. /**
  1388. * Gets charsets array and their quality accepted by the browser/client from $_SERVER['HTTP_ACCEPT_CHARSET']
  1389. *
  1390. * @return array
  1391. */
  1392. public function getClientCharsets(){
  1393. }
  1394. /**
  1395. * Gets best charset accepted by the browser/client from $_SERVER['HTTP_ACCEPT_CHARSET']
  1396. *
  1397. * @return string
  1398. */
  1399. public function getBestCharset(){
  1400. }
  1401. /**
  1402. * Gets languages array and their quality accepted by the browser/client from $_SERVER['HTTP_ACCEPT_LANGUAGE']
  1403. *
  1404. * @return array
  1405. */
  1406. public function getLanguages(){
  1407. }
  1408. /**
  1409. * Gets best language accepted by the browser/client from $_SERVER['HTTP_ACCEPT_LANGUAGE']
  1410. *
  1411. * @return string
  1412. */
  1413. public function getBestLanguage(){
  1414. }
  1415. /**
  1416. * Resets the internal singleton
  1417. */
  1418. public static function reset(){
  1419. }
  1420. }
  1421. /**
  1422. * Phalcon_Response
  1423. *
  1424. * Encapsulates the HTTP response message.
  1425. *
  1426. *<code>
  1427. *$response = Phalcon_Response::getInstance();
  1428. *$response->setStatusCode(200, "OK");
  1429. *$response->setContent("<html><body>Hello</body></html>");
  1430. *$response->send();
  1431. *</code>
  1432. */
  1433. class Phalcon_Response
  1434. {
  1435. /**
  1436. * Returns singleton Phalcon_Response instance
  1437. *
  1438. * @return Phalcon_Response
  1439. */
  1440. public static function getInstance(){
  1441. }
  1442. /**
  1443. * Sets the HTTP response code
  1444. *
  1445. * @param int $code
  1446. * @param strign $message
  1447. */
  1448. public function setStatusCode($code, $message){
  1449. }
  1450. /**
  1451. * Overwrites a header in the response
  1452. *
  1453. *<code>
  1454. *$response->setHeader("Content-Type", "text/plain");
  1455. *</code>
  1456. *
  1457. * @param string $name
  1458. * @param string $value
  1459. */
  1460. public function setHeader($name, $value){
  1461. }
  1462. /**
  1463. * Send a raw header to the response
  1464. *
  1465. *<code>
  1466. *$response->setRawHeader("HTTP/1.1 404 Not Found");
  1467. *</code>
  1468. */
  1469. public function setRawHeader($header){
  1470. }
  1471. /**
  1472. * Redirect by HTTP to another action or URL
  1473. *
  1474. *<code>
  1475. *$response->redirect("posts/index");
  1476. *$response->redirect("http://en.wikipedia.org", true);
  1477. *</code>
  1478. *
  1479. * @param string $location
  1480. * @param boolean $full
  1481. */
  1482. public function redirect($location, $full=false){
  1483. }
  1484. /**
  1485. * Sets HTTP response body
  1486. *
  1487. *<code>
  1488. *$response->setContent("<h1>Hello!</h1>");
  1489. *</code>
  1490. *
  1491. * @param string $content
  1492. */
  1493. public function setContent($content){
  1494. }
  1495. /**
  1496. * Appends a string to the HTTP response body
  1497. *
  1498. * @param string $content
  1499. */
  1500. public function appendContent($content){
  1501. }
  1502. /**
  1503. * Gets HTTP response body
  1504. *
  1505. * @return string
  1506. */
  1507. public function getContent(){
  1508. }
  1509. /**
  1510. * Prints out HTTP response to the client
  1511. *
  1512. */
  1513. public function send(){
  1514. }
  1515. /**
  1516. * Resets the internal singleton
  1517. */
  1518. public static function reset(){
  1519. }
  1520. }
  1521. /**
  1522. * Phalcon_Session
  1523. *
  1524. * Session client-server persistent state data management. This component
  1525. * allow you to separate your session data between application or modules.
  1526. * With this, it's possible to use the same index to refer a variable
  1527. * but they can be in different applications.
  1528. *
  1529. * <code>
  1530. * Phalcon_Session::start(array(
  1531. * 'uniqueId' => 'my-private-app'
  1532. * ));
  1533. *
  1534. * Phalcon_Session::set('var', 'some-value');
  1535. *
  1536. * echo Phalcon_Session::set('var');
  1537. * </code>
  1538. */
  1539. abstract class Phalcon_Session
  1540. {
  1541. /**
  1542. * Starts session, optionally using an adapter
  1543. *
  1544. * @param array $options
  1545. */
  1546. public static function start($options=array ()){
  1547. }
  1548. /**
  1549. * Sets session options
  1550. *
  1551. * @param array $options
  1552. */
  1553. public static function setOptions($options){
  1554. }
  1555. /**
  1556. * Gets a session variable from an application context
  1557. *
  1558. * @param string $index
  1559. */
  1560. public static function get($index){
  1561. }
  1562. /**
  1563. * Sets a session variable in an application context
  1564. *
  1565. * @param string $index
  1566. * @param string $value
  1567. */
  1568. public static function set($index, $value){
  1569. }
  1570. /**
  1571. * Check whether a session variable is set in an application context
  1572. *
  1573. * @param string $index
  1574. */
  1575. public static function has($index){
  1576. }
  1577. /**
  1578. * Removes a session variable from an application context
  1579. *
  1580. * @param string $index
  1581. */
  1582. public static function remove($index){
  1583. }
  1584. /**
  1585. * Returns active session id
  1586. *
  1587. * @return string
  1588. */
  1589. public static function getId(){
  1590. }
  1591. }
  1592. /**
  1593. * Phalcon_Tag
  1594. *
  1595. * Phalcon_Tag is designed to simplify building of HTML tags.
  1596. * It provides a set of helpers to generate HTML in a dynamic way.
  1597. * This component is an abstract class that you can extend to add more helpers.
  1598. */
  1599. abstract class Phalcon_Tag
  1600. {
  1601. /**
  1602. * Sets the request dispatcher. A valid dispatcher is required to generate absolute paths
  1603. *
  1604. * @param Phalcon_Dispatcher $dispatcher
  1605. */
  1606. public static function setDispatcher($dispatcher){
  1607. }
  1608. /**
  1609. * Internally gets the request dispatcher
  1610. *
  1611. * @return Phalcon_Dispatcher
  1612. */
  1613. protected static function _getDispatcher(){
  1614. }
  1615. /**
  1616. * Assigns default values to generated tags by helpers
  1617. *
  1618. * <code>
  1619. * //Assigning "peter" to "name" component
  1620. * Phalcon_Tag::setDefault("name", "peter");
  1621. *
  1622. * //Later in the view
  1623. * echo Phalcon_Tag::textField("name"); //Will have the value "peter" by default
  1624. * </code>
  1625. *
  1626. * @param string $id
  1627. * @param string $value
  1628. */
  1629. public static function setDefault($id, $value){
  1630. }
  1631. /**
  1632. * Alias of Phalcon_Tag::setDefault
  1633. *
  1634. * @param string $id
  1635. * @param string $value
  1636. */
  1637. public static function displayTo($id, $value){
  1638. }
  1639. /**
  1640. * Every helper calls this function to check whether a component has a predefined
  1641. * value using Phalcon_Tag::displayTo or value from $_POST
  1642. *
  1643. * @param string $name
  1644. * @return mixed
  1645. */
  1646. public static function getValue($name){
  1647. }
  1648. /**
  1649. * Resets the request and internal values to avoid those fields will have any default value
  1650. */
  1651. public static function resetInput(){
  1652. }
  1653. /**
  1654. * Builds a HTML A tag using framework conventions
  1655. *
  1656. * <code>echo Phalcon_Tag::linkTo('signup/register', 'Register Here!')</code>
  1657. *
  1658. * @param array $parameters
  1659. * @return string
  1660. */
  1661. public static function linkTo($parameters, $text=NULL){
  1662. }
  1663. /**
  1664. * Builds generic INPUT tags
  1665. *
  1666. * @param string $type
  1667. * @param array $parameters
  1668. * @return string
  1669. */
  1670. protected static function _inputField($type, $parameters){
  1671. }
  1672. /**
  1673. * Builds a HTML input[type="text"] tag
  1674. *
  1675. * <code>echo Phalcon_Tag::textField(array("name", "size" => 30))</code>
  1676. *
  1677. * @param array $parameters
  1678. * @return string
  1679. */
  1680. public static function textField($parameters){
  1681. }
  1682. /**
  1683. * Builds a HTML input[type="password"] tag
  1684. *
  1685. * <code>echo Phalcon_Tag::passwordField(array("name", "size" => 30))</code>
  1686. *
  1687. * @param array $parameters
  1688. * @return string
  1689. */
  1690. public static function passwordField($parameters){
  1691. }
  1692. /**
  1693. * Builds a HTML input[type="hidden"] tag
  1694. *
  1695. * <code>echo Phalcon_Tag::hiddenField(array("name", "value" => "mike"))</code>
  1696. *
  1697. * @param array $parameters
  1698. * @return string
  1699. */
  1700. public static function hiddenField($parameters){
  1701. }
  1702. /**
  1703. * Builds a HTML input[type="file"] tag
  1704. *
  1705. * <code>echo Phalcon_Tag::fileField("file")</code>
  1706. *
  1707. * @param array $parameters
  1708. * @return string
  1709. */
  1710. public static function fileField($parameters){
  1711. }
  1712. /**
  1713. * Builds a HTML input[type="check"] tag
  1714. *
  1715. * <code>echo Phalcon_Tag::checkField(array("name", "size" => 30))</code>
  1716. *
  1717. * @param array $parameters
  1718. * @return string
  1719. */
  1720. public static function checkField($parameters){
  1721. }
  1722. /**
  1723. * Builds a HTML input[type="submit"] tag
  1724. *
  1725. * <code>echo Phalcon_Tag::submitButton("Save")</code>
  1726. *
  1727. * @param array $params
  1728. * @return string
  1729. */
  1730. public static function submitButton($parameters){
  1731. }
  1732. /**
  1733. * Builds a HTML SELECT tag using a PHP array for options
  1734. *
  1735. * <code>echo Phalcon_Tag::selectStatic("status", array("A" => "Active", "I" => "Inactive"))</code>
  1736. *
  1737. * @param array $parameters
  1738. * @return string
  1739. */
  1740. public static function selectStatic($parameters, $data=NULL){
  1741. }
  1742. /**
  1743. * Builds a HTML SELECT tag using a Phalcon_Model resultset as options
  1744. *
  1745. * <code>echo Phalcon_Tag::selectStatic(array(
  1746. * "robotId",
  1747. * Robots::find("type = 'mechanical'"),
  1748. * "using" => array("id", "name")
  1749. * ))</code>
  1750. *
  1751. * @param array $params
  1752. * @return string
  1753. */
  1754. public static function select($parameters, $data=NULL){
  1755. }
  1756. /**
  1757. * Builds a HTML TEXTAREA tag
  1758. *
  1759. * <code>echo Phalcon_Tag::textArea(array("comments", "cols" => 10, "rows" => 4))</code>
  1760. *
  1761. * @param array $parameters
  1762. * @return string
  1763. */
  1764. public static function textArea($parameters){
  1765. }
  1766. /**
  1767. * Builds a HTML FORM tag
  1768. *
  1769. * <code>
  1770. * echo Phalcon_Tag::form("posts/save");
  1771. * echo Phalcon_Tag::form(array("posts/save", "method" => "post"));
  1772. * </code>
  1773. *
  1774. * @param array $parameters
  1775. * @return string
  1776. */
  1777. public static function form($parameters=NULL){
  1778. }
  1779. /**
  1780. * Builds a HTML close FORM tag
  1781. *
  1782. * @return string
  1783. */
  1784. public static function endForm(){
  1785. }
  1786. /**
  1787. * Set the title of view content
  1788. *
  1789. * @param string $title
  1790. */
  1791. public static function setTitle($title){
  1792. }
  1793. /**
  1794. * Add to title of view content
  1795. *
  1796. * @param string $title
  1797. */
  1798. public static function appendTitle($title){
  1799. }
  1800. /**
  1801. * Add before the title of view content
  1802. *
  1803. * @param string $title
  1804. */
  1805. public static function prependTitle($title){
  1806. }
  1807. /**
  1808. * Get the title of view content
  1809. *
  1810. * @return string
  1811. */
  1812. public static function getTitle(){
  1813. }
  1814. /**
  1815. * Builds a LINK[rel="stylesheet"] tag
  1816. *
  1817. * <code>
  1818. * echo Phalcon_Tag::stylesheetLink("http://fonts.googleapis.com/css?family=Rosario", false);
  1819. * echo Phalcon_Tag::stylesheetLink("css/style.css");
  1820. * </code>
  1821. *
  1822. * @param array $parameters
  1823. * @param boolean $local
  1824. * @return string
  1825. */
  1826. public static function stylesheetLink($parameters=NULL, $local=true){
  1827. }
  1828. /**
  1829. * Builds a SCRIPT[type="javascript"] tag
  1830. *
  1831. * <code>
  1832. * echo Phalcon_Tag::javascriptInclude("http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js", false);
  1833. * echo Phalcon_Tag::javascriptInclude("javascript/jquery.js");
  1834. * </code>
  1835. *
  1836. * @param array $parameters
  1837. * @param boolean $local
  1838. * @return string
  1839. */
  1840. public static function javascriptInclude($parameters=NULL, $local=true){
  1841. }
  1842. /**
  1843. * Builds HTML IMG tags
  1844. *
  1845. * @param array $parameters
  1846. * @return string
  1847. */
  1848. public static function image($parameters=NULL){
  1849. }
  1850. }
  1851. class Phalcon_Text
  1852. {
  1853. /**
  1854. * Converts strings to camelize style
  1855. *
  1856. * <code>Phalcon_Utils::camelize('coco_bongo'); //CocoBongo</code>
  1857. *
  1858. * @param string $str
  1859. * @return string
  1860. */
  1861. public static function camelize($str){
  1862. }
  1863. /**
  1864. * Uncamelize strings which are camelized
  1865. *
  1866. * <code>Phalcon_Utils::camelize('CocoBongo'); //coco_bongo</code>
  1867. *
  1868. * @param string $str
  1869. * @return string
  1870. */
  1871. public static function uncamelize($str){
  1872. }
  1873. }
  1874. /**
  1875. * Phalcon_Transaction
  1876. *
  1877. * Transactions are protective blocks where SQL statements are only permanent if they can
  1878. * all succeed as one atomic action. Phalcon_Transaction is intended to be used with Phalcon_Model_Base.
  1879. * Phalcon Transactions should be created using Phalcon_Transaction_Manager.
  1880. *
  1881. *<code>
  1882. *try {
  1883. *
  1884. * $transaction = Phalcon_Transaction_Manager::get();
  1885. *
  1886. * $robot = new Robots();
  1887. * $robot->setTransaction($transaction);
  1888. * $robot->name = 'WALL·E';
  1889. * $robot->created_at = date('Y-m-d');
  1890. * if($robot->save()==false){
  1891. * $transaction->rollback("Can't save robot");
  1892. * }
  1893. *
  1894. * $robotPart = new RobotParts();
  1895. * $robotPart->setTransaction($transaction);
  1896. * $robotPart->type = 'head';
  1897. * if($robotPart->save()==false){
  1898. * $transaction->rollback("Can't save robot part");
  1899. * }
  1900. *
  1901. * $transaction->commit();
  1902. *
  1903. *}
  1904. *catch(Phalcon_Transaction_Failed $e){
  1905. * echo 'Failed, reason: ', $e->getMessage();
  1906. *}
  1907. *
  1908. *</code>
  1909. */
  1910. class Phalcon_Transaction
  1911. {
  1912. /**
  1913. * Phalcon_Transaction constructor
  1914. *
  1915. * @param boolean $autoBegin
  1916. */
  1917. public function __construct($autoBegin=false){
  1918. }
  1919. /**
  1920. * Sets transaction manager related to the transaction
  1921. *
  1922. * @param Phalcon_Transaction_Manager $manager
  1923. */
  1924. public function setTransactionManager($manager){
  1925. }
  1926. /**
  1927. * Starts the transaction
  1928. */
  1929. public function begin(){
  1930. }
  1931. /**
  1932. * Commits the transaction
  1933. *
  1934. * @return boolean
  1935. */
  1936. public function commit(){
  1937. }
  1938. /**
  1939. * Rollbacks the transaction
  1940. *
  1941. * @param string $rollbackMessage
  1942. * @param Phalcon_Model_Base $rollbackRecord
  1943. * @return boolean
  1944. */
  1945. public function rollback($rollbackMessage=NULL, $rollbackRecord=NULL){
  1946. }
  1947. /**
  1948. * Returns connection related to transaction
  1949. *
  1950. * @return Phalcon_Db
  1951. */
  1952. public function getConnection(){
  1953. }
  1954. /**
  1955. * Sets if is a reused transaction or new once
  1956. *
  1957. * @param boolean $isNew
  1958. */
  1959. public function setIsNewTransaction($isNew){
  1960. }
  1961. /**
  1962. * Sets flag to rollback on abort the HTTP connection
  1963. *
  1964. * @param boolean $rollbackOnAbort
  1965. */
  1966. public function setRollbackOnAbort($rollbackOnAbort){
  1967. }
  1968. /**
  1969. * Checks whether transaction is managed by a transaction manager
  1970. *
  1971. * @return boolean
  1972. */
  1973. public function isManaged(){
  1974. }
  1975. /**
  1976. * Changes dependency internal pointer
  1977. *
  1978. * @param int $pointer
  1979. */
  1980. public function setDependencyPointer($pointer){
  1981. }
  1982. /**
  1983. * Attaches Phalcon_Model_Base object to the active transaction
  1984. *
  1985. * @param int $pointer
  1986. * @param Phalcon_Model_Base $object
  1987. */
  1988. public function attachDependency($pointer, $object){
  1989. }
  1990. /**
  1991. * Make a bulk save on all attached objects
  1992. *
  1993. * @return boolean
  1994. */
  1995. public function save(){
  1996. }
  1997. /**
  1998. * Returns validations messages from last save try
  1999. *
  2000. * @return array
  2001. */
  2002. public function getMessages(){
  2003. }
  2004. /**
  2005. * Checks whether internal connection is under an active transaction
  2006. *
  2007. * @return boolean
  2008. */
  2009. public function isValid(){
  2010. }
  2011. /**
  2012. * Sets object which generates rollback action
  2013. *
  2014. * @param Phalcon_Model_Base $record
  2015. */
  2016. public function setRollbackedRecord($record){
  2017. }
  2018. }
  2019. /**
  2020. * Phalcon_Translate
  2021. *
  2022. * Translate component allows the creation of multi-language applications using
  2023. * different adapters for translation lists.
  2024. */
  2025. class Phalcon_Translate implements ArrayAccess
  2026. {
  2027. /**
  2028. * Phalcon_Translate constructor
  2029. *
  2030. * @param string $adapter
  2031. * @param array $options
  2032. */
  2033. public function __construct($adapter, $options){
  2034. }
  2035. /**
  2036. * Returns the translation string of the given key
  2037. *
  2038. * @param string $translateKey
  2039. * @param array $placeholders
  2040. * @return string
  2041. */
  2042. public function _($translateKey, $placeholders=array ()){
  2043. }
  2044. /**
  2045. * Sets a translation value
  2046. *
  2047. * @param string $offset
  2048. * @param string $value
  2049. */
  2050. public function offsetSet($offset, $value){
  2051. }
  2052. /**
  2053. * Check whether a translation key exists
  2054. *
  2055. * @param string $translateKey
  2056. * @return boolean
  2057. */
  2058. public function offsetExists($translateKey){
  2059. }
  2060. /**
  2061. * Elimina un indice del diccionario
  2062. *
  2063. * @param string $offset
  2064. */
  2065. public function offsetUnset($offset){
  2066. }
  2067. /**
  2068. * Returns the translation related to the given key
  2069. *
  2070. * @param string $traslateKey
  2071. * @return string
  2072. */
  2073. public function offsetGet($traslateKey){
  2074. }
  2075. }
  2076. /**
  2077. * Phalcon_Utils
  2078. *
  2079. * Implements functionality used widely by the framework
  2080. */
  2081. class Phalcon_Utils
  2082. {
  2083. /**
  2084. * This function is now deprecated, use Phalcon_Text::camelize instead
  2085. *
  2086. * @param string $str
  2087. * @return string
  2088. */
  2089. public static function camelize($str){
  2090. }
  2091. /**
  2092. * This function is now deprecated, use Phalcon_Text::uncamelize instead
  2093. *
  2094. * @param string $str
  2095. * @return string
  2096. */
  2097. public static function uncamelize($str){
  2098. }
  2099. /**
  2100. * Gets public URL to phalcon instance
  2101. *
  2102. * @param string $uri
  2103. * @return string
  2104. */
  2105. public static function getUrl($uri=NULL){
  2106. }
  2107. /**
  2108. * Gets path to local file
  2109. *
  2110. * @param string $extraPath
  2111. * @return string
  2112. */
  2113. public static function getLocalPath($extraPath=NULL){
  2114. }
  2115. }
  2116. /**
  2117. * Phalcon_View
  2118. *
  2119. * Phalcon_View is a class for working with the "view" portion of the model-view-controller pattern.
  2120. * That is, it exists to help keep the view script separate from the model and controller scripts.
  2121. * It provides a system of helpers, output filters, and variable escaping.
  2122. *
  2123. * <code>
  2124. * //Setting views directory
  2125. * $view = new Phalcon_View();
  2126. * $view->setViewsDir('app/views/');
  2127. *
  2128. * $view->start();
  2129. * //Shows recent posts view (app/views/posts/recent.phtml)
  2130. * $view->render('posts', 'recent');
  2131. * $view->finish();
  2132. *
  2133. * //Printing views output
  2134. * echo $view->getContent();
  2135. * </code>
  2136. */
  2137. class Phalcon_View
  2138. {
  2139. const LEVEL_MAIN_LAYOUT = 5;
  2140. const LEVEL_AFTER_TEMPLATE = 4;
  2141. const LEVEL_LAYOUT = 3;
  2142. const LEVEL_BEFORE_TEMPLATE = 2;
  2143. const LEVEL_ACTION_VIEW = 1;
  2144. const LEVEL_NO_RENDER = 0;
  2145. /**
  2146. * Sets views directory. Depending of your platform, always add a trailing slash or backslash
  2147. *
  2148. * @param string $viewsDir
  2149. */
  2150. public function setViewsDir($viewsDir){
  2151. }
  2152. /**
  2153. * Gets views directory
  2154. *
  2155. * @return string
  2156. */
  2157. public function getViewsDir(){
  2158. }
  2159. /**
  2160. * Sets base path. Depending of your platform, always add a trailing slash or backslash
  2161. *
  2162. * <code>
  2163. * $view->setBasePath(__DIR__.'/');
  2164. * </code>
  2165. *
  2166. * @param string $basePath
  2167. */
  2168. public function setBasePath($basePath){
  2169. }
  2170. /**
  2171. * Sets the render level for the view
  2172. *
  2173. * <code>
  2174. * //Render the view related to the controller only
  2175. * $this->view->setRenderLevel(Phalcon_View::LEVEL_VIEW);
  2176. * </code>
  2177. *
  2178. * @param string $level
  2179. */
  2180. public function setRenderLevel($level){
  2181. }
  2182. /**
  2183. * Sets default view name. Must be a file without extension in the views directory
  2184. *
  2185. * <code>
  2186. * //Renders as main view views-dir/inicio.phtml
  2187. * $this->view->setMainView('inicio');
  2188. * </code>
  2189. *
  2190. * @param string $name
  2191. */
  2192. public function setMainView($viewPath){
  2193. }
  2194. /**
  2195. * Appends template before controller layout
  2196. *
  2197. * @param string|array $templateBefore
  2198. */
  2199. public function setTemplateBefore($templateBefore){
  2200. }
  2201. /**
  2202. * Resets any template before layouts
  2203. *
  2204. */
  2205. public function cleanTemplateBefore(){
  2206. }
  2207. /**
  2208. * Appends template after controller layout
  2209. *
  2210. * @param string|array $templateAfter
  2211. */
  2212. public function setTemplateAfter($templateAfter){
  2213. }
  2214. /**
  2215. * Resets any template before layouts
  2216. *
  2217. */
  2218. public function cleanTemplateAfter(){
  2219. }
  2220. /**
  2221. * Adds parameters to views (alias of setVar)
  2222. *
  2223. * @param string $key
  2224. * @param mixed $value
  2225. */
  2226. public function setParamToView($key, $value){
  2227. }
  2228. /**
  2229. * Adds parameters to views
  2230. *
  2231. * @param string $key
  2232. * @param mixed $value
  2233. */
  2234. public function setVar($key, $value){
  2235. }
  2236. /**
  2237. * Returns parameters to views
  2238. *
  2239. * @return array
  2240. */
  2241. public function getParamsToView(){
  2242. }
  2243. /**
  2244. * Gets the name of the controller rendered
  2245. *
  2246. * @return string
  2247. */
  2248. public function getControllerName(){
  2249. }
  2250. /**
  2251. * Gets the name of the action rendered
  2252. *
  2253. * @return string
  2254. */
  2255. public function getActionName(){
  2256. }
  2257. /**
  2258. * Gets extra parameters of the action rendered
  2259. */
  2260. public function getParams(){

Large files files are truncated, but you can click here to view the full file