-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from fesiong/master
add phalcon 4.0 version files to ide-strubs
- Loading branch information
Showing
69 changed files
with
4,080 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace Phalcon; | ||
|
||
use Psr\Container\ContainerInterface; | ||
use Phalcon\DiInterface; | ||
|
||
class Container implements ContainerInterface | ||
{ | ||
/** | ||
* @var <DiInterface> | ||
*/ | ||
protected $container; | ||
|
||
/** | ||
* Phalcon\Di constructor | ||
*/ | ||
public function __construct(DiInterface $container) | ||
{ | ||
} | ||
|
||
/** | ||
* Return the service | ||
*/ | ||
public function get($name) { | ||
} | ||
|
||
/** | ||
* Whether a service exists or not in the container | ||
*/ | ||
public function has($name) : bool | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace Phalcon; | ||
|
||
/** | ||
* Phalcon\Plugin | ||
* | ||
* This class can be used to provide user plugins an easy access to services | ||
* in the application | ||
*/ | ||
class Plugin extends \Phalcon\Di\Injectable | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,188 @@ | ||
<?php | ||
|
||
namespace Phalcon; | ||
|
||
use Phalcon\DiInterface; | ||
use Phalcon\UrlInterface; | ||
use Phalcon\Url\Exception; | ||
use Phalcon\Mvc\RouterInterface; | ||
use Phalcon\Mvc\Router\RouteInterface; | ||
use Phalcon\Di\InjectionAwareInterface; | ||
|
||
/** | ||
* Phalcon\Url | ||
* | ||
* This components helps in the generation of: URIs, URLs and Paths | ||
* | ||
*<code> | ||
* // 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", | ||
* ] | ||
* ); | ||
*</code> | ||
*/ | ||
class Url implements UrlInterface, InjectionAwareInterface | ||
{ | ||
|
||
/** | ||
* @var null | string | ||
*/ | ||
protected $baseUri = null; | ||
|
||
/** | ||
* @var null | string | ||
*/ | ||
protected $basePath = null; | ||
|
||
/** | ||
* @var <DiInterface> | ||
*/ | ||
protected $container; | ||
|
||
protected $router; | ||
|
||
/** | ||
* @var null | string | ||
*/ | ||
protected $staticBaseUri = null; | ||
|
||
/** | ||
* Generates a URL | ||
* | ||
*<code> | ||
* // 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", | ||
* ] | ||
* ); | ||
* | ||
* // Generate a URL with GET arguments (/show/products?id=1&name=Carrots) | ||
* echo $url->get( | ||
* "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 | ||
* ); | ||
*</code> | ||
*/ | ||
public function get($uri = null, $args = null, bool $local = null, $baseUri = null) : string | ||
{ | ||
} | ||
|
||
/** | ||
* Returns the base path | ||
*/ | ||
public function getBasePath() : string | ||
{ | ||
} | ||
|
||
/** | ||
* Returns the prefix for all the generated urls. By default / | ||
*/ | ||
public function getBaseUri() : string | ||
{ | ||
} | ||
|
||
/** | ||
* Returns the DependencyInjector container | ||
*/ | ||
public function getDI() : DiInterface | ||
{ | ||
} | ||
|
||
/** | ||
* Generates a URL for a static resource | ||
* | ||
*<code> | ||
* // 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", | ||
* ] | ||
* ); | ||
*</code> | ||
*/ | ||
public function getStatic($uri = null) : string | ||
{ | ||
} | ||
|
||
/** | ||
* Returns the prefix for all the generated static urls. By default / | ||
*/ | ||
public function getStaticBaseUri() : string | ||
{ | ||
} | ||
|
||
/** | ||
* Sets a base path for all the generated paths | ||
* | ||
*<code> | ||
* $url->setBasePath("/var/www/htdocs/"); | ||
*</code> | ||
*/ | ||
public function setBasePath(string $basePath) : UrlInterface | ||
{ | ||
} | ||
|
||
/** | ||
* Sets a prefix for all the URIs to be generated | ||
* | ||
*<code> | ||
* $url->setBaseUri("/invo/"); | ||
* | ||
* $url->setBaseUri("/invo/index.php/"); | ||
*</code> | ||
*/ | ||
public function setBaseUri(string $baseUri) : UrlInterface | ||
{ | ||
} | ||
|
||
/** | ||
* Sets the DependencyInjector container | ||
*/ | ||
public function setDI(DiInterface $dependencyInjector) | ||
{ | ||
} | ||
|
||
/** | ||
* Sets a prefix for all static URLs generated | ||
* | ||
*<code> | ||
* $url->setStaticBaseUri("/invo/"); | ||
*</code> | ||
*/ | ||
public function setStaticBaseUri(string $staticBaseUri) : UrlInterface | ||
{ | ||
} | ||
|
||
/** | ||
* Generates a local path | ||
*/ | ||
public function path(string $path = null) : string | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
namespace Phalcon; | ||
|
||
/** | ||
* Phalcon\UrlInterface | ||
* | ||
* Interface for Phalcon\UrlInterface | ||
*/ | ||
interface UrlInterface | ||
{ | ||
/** | ||
* Generates a URL | ||
* | ||
* @param string|array uri | ||
* @param array|object args Optional arguments to be appended to the query string | ||
*/ | ||
public function get($uri = null, $args = null, bool $local = null) : string; | ||
|
||
/** | ||
* Returns a base path | ||
*/ | ||
public function getBasePath() : string; | ||
|
||
/** | ||
* Returns the prefix for all the generated urls. By default / | ||
*/ | ||
public function getBaseUri() : string; | ||
|
||
/** | ||
* Sets a base paths for all the generated paths | ||
*/ | ||
public function setBasePath(string $basePath) : UrlInterface; | ||
|
||
/** | ||
* Sets a prefix to all the urls generated | ||
*/ | ||
public function setBaseUri(string $baseUri) : UrlInterface; | ||
|
||
/** | ||
* Generates a local path | ||
*/ | ||
public function path(string $path = null) : string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
namespace Phalcon\Acl; | ||
|
||
use Phalcon\Acl\Exception; | ||
|
||
/** | ||
* Phalcon\Acl\Component | ||
* | ||
* This class defines component entity and its description | ||
*/ | ||
class Component implements ComponentInterface | ||
{ | ||
|
||
/** | ||
* Component description | ||
* @var string | ||
*/ | ||
private $description; | ||
|
||
/** | ||
* Component name | ||
* @var string | ||
*/ | ||
private $name; | ||
|
||
/** | ||
* Phalcon\Acl\Component constructor | ||
*/ | ||
public function __construct(string $name, string $description = null) | ||
{ | ||
} | ||
|
||
/** | ||
* Returns component description | ||
*/ | ||
public function getDescription(): string | ||
{ | ||
// TODO: Implement getDescription() method. | ||
} | ||
|
||
/** | ||
* Returns the component name | ||
*/ | ||
public function getName(): string | ||
{ | ||
// TODO: Implement getName() method. | ||
} | ||
|
||
/** | ||
* Magic method __toString | ||
*/ | ||
public function __toString(): string | ||
{ | ||
// TODO: Implement __toString() method. | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace Phalcon\Acl; | ||
|
||
/** | ||
* Phalcon\Acl\ComponentAware | ||
* | ||
* Interface for classes which could be used in allow method as RESOURCE | ||
*/ | ||
interface ComponentAware | ||
{ | ||
/** | ||
* Returns component name | ||
*/ | ||
public function getComponentName() : string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace Phalcon\Acl; | ||
|
||
/** | ||
* | ||
* Phalcon\Acl\ComponentInterface | ||
* | ||
* Interface for Phalcon\Acl\Component | ||
*/ | ||
interface ComponentInterface | ||
{ | ||
/** | ||
* Returns component description | ||
*/ | ||
public function getDescription() : string; | ||
|
||
/** | ||
* Returns the component name | ||
*/ | ||
public function getName() : string; | ||
|
||
/** | ||
* Magic method __toString | ||
*/ | ||
public function __toString() : string; | ||
} |
Oops, something went wrong.