From 6dea46ff3e6d66bffd8f5e82e8cd77fed57ba72c Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Sun, 10 Mar 2013 01:07:57 +0100 Subject: [PATCH] Initial commit --- .gitignore | 3 + _IDE_helper.php | 9137 +++++++++++++++++ composer.json | 21 + readme.md | 31 + src/Barryvdh/IdeHelper/GeneratorCommand.php | 128 + .../IdeHelper/IdeHelperServiceProvider.php | 49 + src/config/.gitkeep | 0 src/config/config.php | 66 + 8 files changed, 9435 insertions(+) create mode 100644 .gitignore create mode 100644 _IDE_helper.php create mode 100644 composer.json create mode 100644 readme.md create mode 100644 src/Barryvdh/IdeHelper/GeneratorCommand.php create mode 100644 src/Barryvdh/IdeHelper/IdeHelperServiceProvider.php create mode 100644 src/config/.gitkeep create mode 100644 src/config/config.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..335df2d --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/vendor +composer.lock +.idea diff --git a/_IDE_helper.php b/_IDE_helper.php new file mode 100644 index 0000000..37139e1 --- /dev/null +++ b/_IDE_helper.php @@ -0,0 +1,9137 @@ + CR LF + $ CR LF + CR LF + ... + $ CR LF + CR LF + More information regarding the Redis protocol: http://redis.io/topics/protocol + * + * @static + * @param string $method + * @param array $parameters + * @return string + */ + public static function buildCommand($method, $parameters){} + + /** + * Parse the Redis database response. + * + * @static + * @param string $response + * @return mixed + */ + public static function parseResponse($response){} + + /** + * Parse an inline response from the database. + * + * @static + * @param string $response + * @return string + */ + public static function parseInlineResponse($response){} + + /** + * Parse a bulk response from the database. + * + * @static + * @param string $response + * @return string + */ + public static function parseBulkResponse($response){} + + /** + * Read the next block of bytes for a bulk response. + * + * @static + * @param int $total + * @param int $read + * @return string + */ + public static function readBulkBlock($total, $read){} + + /** + * Parse a multi-bulk response from the database. + * + * @static + * @param string $response + * @return array + */ + public static function parseMultiResponse($response){} + + /** + * Get the socket connection to the database. + * + * @static + * @return resource + */ + public static function openSocket(){} + + /** + * Read the specified number of bytes from the file resource. + * + * @static + * @param int $bytes + * @return string + */ + public static function fileRead($bytes){} + + /** + * Get the specified number of bytes from a file line. + * + * @static + * @param int $bytes + * @return string + */ + public static function fileGet($bytes){} + + /** + * Write the given command to the file resource. + * + * @static + * @param string $command + * @return void + */ + public static function fileWrite($command){} + + /** + * Get the Redis socket connection. + * + * @static + * @return resource + */ + public static function getConnection(){} + + /** + * Dynamically make a Redis command. + * + * @static + * @param string $method + * @param array $parameters + * @return mixed + */ + public static function __call($method, $parameters){} + +} + +class Request extends Illuminate\Http\Request{ + /** + * Return the Request instance. + * + * @static + * @return Illuminate\Http\Request + */ + public static function instance(){} + + /** + * Get the root URL for the application. + * + * @static + * @return string + */ + public static function root(){} + + /** + * Get the URL (no query string) for the request. + * + * @static + * @return string + */ + public static function url(){} + + /** + * Get the full URL for the request. + * + * @static + * @return string + */ + public static function fullUrl(){} + + /** + * Get the current path info for the request. + * + * @static + * @return string + */ + public static function path(){} + + /** + * Get a segment from the URI (1 based index). + * + * @static + * @param string $index + * @param mixed $default + * @return string + */ + public static function segment($index, $default = null){} + + /** + * Get all of the segments for the request path. + * + * @static + * @return array + */ + public static function segments(){} + + /** + * Determine if the current request URI matches a pattern. + * + * @static + * @param string $pattern + * @return bool + */ + public static function is($pattern){} + + /** + * Determine if the request is the result of an AJAX call. + * + * @static + * @return bool + */ + public static function ajax(){} + + /** + * Determine if the request is over HTTPS. + * + * @static + * @return bool + */ + public static function secure(){} + + /** + * Determine if the request contains a given input item. + * + * @static + * @param string|array $key + * @return bool + */ + public static function has($key){} + + /** + * Get all of the input and files for the request. + * + * @static + * @return array + */ + public static function all(){} + + /** + * Retrieve an input item from the request. + * + * @static + * @param string $key + * @param mixed $default + * @return string + */ + public static function input($key = null, $default = null){} + + /** + * Get a subset of the items from the input data. + * + * @static + * @param array $keys + * @return array + */ + public static function only($keys){} + + /** + * Get all of the input except for a specified array of items. + * + * @static + * @param array $keys + * @return array + */ + public static function except($keys){} + + /** + * Retrieve a query string item from the request. + * + * @static + * @param string $key + * @param mixed $default + * @return string + */ + public static function query($key = null, $default = null){} + + /** + * Retrieve a cookie from the request. + * + * @static + * @param string $key + * @param mixed $default + * @return string + */ + public static function cookie($key = null, $default = null){} + + /** + * Retrieve a file from the request. + * + * @static + * @param string $key + * @param mixed $default + * @return Symfony\Component\HttpFoundation\File\UploadedFile + */ + public static function file($key = null, $default = null){} + + /** + * Determine if the uploaded data contains a file. + * + * @static + * @param string $key + * @return bool + */ + public static function hasFile($key){} + + /** + * Retrieve a header from the request. + * + * @static + * @param string $key + * @param mixed $default + * @return string + */ + public static function header($key = null, $default = null){} + + /** + * Retrieve a server variable from the request. + * + * @static + * @param string $key + * @param mixed $default + * @return string + */ + public static function server($key = null, $default = null){} + + /** + * Retrieve an old input item. + * + * @static + * @param string $key + * @param mixed $default + * @return string + */ + public static function old($key = null, $default = null){} + + /** + * Flash the input for the current request to the session. + * + * @static + * @param string $filter + * @param array $keys + * @return void + */ + public static function flash($filter = null, $keys = array()){} + + /** + * Flash only some of the input to the session. + * + * @static + * @param dynamic string + * @return void + */ + public static function flashOnly($keys){} + + /** + * Flash only some of the input to the session. + * + * @static + * @param dynamic string + * @return void + */ + public static function flashExcept($keys){} + + /** + * Flush all of the old input from the session. + * + * @static + * @return void + */ + public static function flush(){} + + /** + * Retrieve a parameter item from a given source. + * + * @static + * @param string $source + * @param string $key + * @param mixed $default + * @return string + */ + public static function retrieveItem($source, $key, $default){} + + /** + * Merge new input into the current request's input array. + * + * @static + * @param array $input + * @return void + */ + public static function merge($input){} + + /** + * Replace the input for the current request. + * + * @static + * @param array $input + * @return void + */ + public static function replace($input){} + + /** + * Get the JSON payload for the request. + * + * @static + * @param string $key + * @param mixed $default + * @return mixed + */ + public static function json($key = null, $default = null){} + + /** + * Get the input source for the request. + * + * @static + * @return Symfony\Component\HttpFoundation\ParameterBag + */ + public static function getInputSource(){} + + /** + * Get the Illuminate session store implementation. + * + * @static + * @return Illuminate\Session\Store + */ + public static function getSessionStore(){} + + /** + * Set the Illuminate session store implementation. + * + * @static + * @param Illuminate\Session\Store $session + * @return void + */ + public static function setSessionStore($session){} + + /** + * Determine if the session store has been set. + * + * @static + * @return bool + */ + public static function hasSessionStore(){} + + /** + * Constructor. + * + * @static + * @param array $query The GET parameters + * @param array $request The POST parameters + * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) + * @param array $cookies The COOKIE parameters + * @param array $files The FILES parameters + * @param array $server The SERVER parameters + * @param string $content The raw body data + * @return void + */ + public static function __construct($query = array(), $request = array(), $attributes = array(), $cookies = array(), $files = array(), $server = array(), $content = null){} + + /** + * Sets the parameters for this request. + This method also re-initializes all properties. + * + * @static + * @param array $query The GET parameters + * @param array $request The POST parameters + * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) + * @param array $cookies The COOKIE parameters + * @param array $files The FILES parameters + * @param array $server The SERVER parameters + * @param string $content The raw body data + * @return void + */ + public static function initialize($query = array(), $request = array(), $attributes = array(), $cookies = array(), $files = array(), $server = array(), $content = null){} + + /** + * Creates a new request with values from PHP's super globals. + * + * @static + * @return Request A new request + */ + public static function createFromGlobals(){} + + /** + * Creates a Request based on a given URI and configuration. + The information contained in the URI always take precedence + over the other information (server and parameters). + * + * @static + * @param string $uri The URI + * @param string $method The HTTP method + * @param array $parameters The query (GET) or request (POST) parameters + * @param array $cookies The request cookies ($_COOKIE) + * @param array $files The request files ($_FILES) + * @param array $server The server parameters ($_SERVER) + * @param string $content The raw body data + * @return Request A Request instance + */ + public static function create($uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null){} + + /** + * Clones a request and overrides some of its parameters. + * + * @static + * @param array $query The GET parameters + * @param array $request The POST parameters + * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) + * @param array $cookies The COOKIE parameters + * @param array $files The FILES parameters + * @param array $server The SERVER parameters + * @return Request The duplicated request + */ + public static function duplicate($query = null, $request = null, $attributes = null, $cookies = null, $files = null, $server = null){} + + /** + * Clones the current request. + Note that the session is not cloned as duplicated requests + are most of the time sub-requests of the main one. + * + * @static + * @return void + */ + public static function __clone(){} + + /** + * Returns the request as a string. + * + * @static + * @return string The request + */ + public static function __toString(){} + + /** + * Overrides the PHP global variables according to this request instance. + It overrides $_GET, $_POST, $_REQUEST, $_SERVER, $_COOKIE. + $_FILES is never override, see rfc1867 + * + * @static + * @return void + */ + public static function overrideGlobals(){} + + /** + * Trusts $_SERVER entries coming from proxies. + * + * @static + * @return void + */ + public static function trustProxyData(){} + + /** + * Sets a list of trusted proxies. + You should only list the reverse proxies that you manage directly. + * + * @static + * @param array $proxies A list of trusted proxies + * @return void + */ + public static function setTrustedProxies($proxies){} + + /** + * Gets the list of trusted proxies. + * + * @static + * @return array An array of trusted proxies. + */ + public static function getTrustedProxies(){} + + /** + * Sets the name for trusted headers. + The following header keys are supported: + * Request::HEADER_CLIENT_IP: defaults to X-Forwarded-For (see getClientIp()) + * Request::HEADER_CLIENT_HOST: defaults to X-Forwarded-Host (see getClientHost()) + * Request::HEADER_CLIENT_PORT: defaults to X-Forwarded-Port (see getClientPort()) + * Request::HEADER_CLIENT_PROTO: defaults to X-Forwarded-Proto (see getScheme() and isSecure()) + Setting an empty value allows to disable the trusted header for the given key. + * + * @static + * @param string $key The header key + * @param string $value The header name + * @return void + */ + public static function setTrustedHeaderName($key, $value){} + + /** + * Returns true if $_SERVER entries coming from proxies are trusted, + false otherwise. + * + * @static + * @return boolean + */ + public static function isProxyTrusted(){} + + /** + * Normalizes a query string. + It builds a normalized query string, where keys/value pairs are alphabetized, + have consistent escaping and unneeded delimiters are removed. + * + * @static + * @param string $qs Query string + * @return string A normalized query string for the Request + */ + public static function normalizeQueryString($qs){} + + /** + * Enables support for the _method request parameter to determine the intended HTTP method. + Be warned that enabling this feature might lead to CSRF issues in your code. + Check that you are using CSRF tokens when required. + The HTTP method can only be overridden when the real HTTP method is POST. + * + * @static + * @return void + */ + public static function enableHttpMethodParameterOverride(){} + + /** + * Checks whether support for the _method request parameter is enabled. + * + * @static + * @return Boolean True when the _method request parameter is enabled, false otherwise + */ + public static function getHttpMethodParameterOverride(){} + + /** + * Gets a "parameter" value. + This method is mainly useful for libraries that want to provide some flexibility. + Order of precedence: GET, PATH, POST + Avoid using this method in controllers: + * slow + * prefer to get from a "named" source + It is better to explicitly get request parameters from the appropriate + public property instead (query, attributes, request). + * + * @static + * @param string $key the key + * @param mixed $default the default value + * @param Boolean $deep is parameter deep in multidimensional array + * @return mixed + */ + public static function get($key, $default = null, $deep = false){} + + /** + * Gets the Session. + * + * @static + * @return SessionInterface|null The session + */ + public static function getSession(){} + + /** + * Whether the request contains a Session which was started in one of the + previous requests. + * + * @static + * @return Boolean + */ + public static function hasPreviousSession(){} + + /** + * Whether the request contains a Session object. + This method does not give any information about the state of the session object, + like whether the session is started or not. It is just a way to check if this Request + is associated with a Session instance. + * + * @static + * @return Boolean true when the Request contains a Session object, false otherwise + */ + public static function hasSession(){} + + /** + * Sets the Session. + * + * @static + * @param SessionInterface $session The Session + * @return void + */ + public static function setSession($session){} + + /** + * Returns the client IP address. + This method can read the client IP address from the "X-Forwarded-For" header + when trusted proxies were set via "setTrustedProxies()". The "X-Forwarded-For" + header value is a comma+space separated list of IP addresses, the left-most + being the original client, and each successive proxy that passed the request + adding the IP address where it received the request from. + If your reverse proxy uses a different header name than "X-Forwarded-For", + ("Client-Ip" for instance), configure it via "setTrustedHeaderName()" with + the "client-ip" key. + * + * @static + * @return string The client IP address + */ + public static function getClientIp(){} + + /** + * Returns current script name. + * + * @static + * @return string + */ + public static function getScriptName(){} + + /** + * Returns the path being requested relative to the executed script. + The path info always starts with a /. + Suppose this request is instantiated from /mysite on localhost: + * http://localhost/mysite returns an empty string + * http://localhost/mysite/about returns '/about' + * http://localhost/mysite/enco%20ded returns '/enco%20ded' + * http://localhost/mysite/about?var=1 returns '/about' + * + * @static + * @return string The raw path (i.e. not urldecoded) + */ + public static function getPathInfo(){} + + /** + * Returns the root path from which this request is executed. + Suppose that an index.php file instantiates this request object: + * http://localhost/index.php returns an empty string + * http://localhost/index.php/page returns an empty string + * http://localhost/web/index.php returns '/web' + * http://localhost/we%20b/index.php returns '/we%20b' + * + * @static + * @return string The raw path (i.e. not urldecoded) + */ + public static function getBasePath(){} + + /** + * Returns the root url from which this request is executed. + The base URL never ends with a /. + This is similar to getBasePath(), except that it also includes the + script filename (e.g. index.php) if one exists. + * + * @static + * @return string The raw url (i.e. not urldecoded) + */ + public static function getBaseUrl(){} + + /** + * Gets the request's scheme. + * + * @static + * @return string + */ + public static function getScheme(){} + + /** + * Returns the port on which the request is made. + This method can read the client port from the "X-Forwarded-Port" header + when trusted proxies were set via "setTrustedProxies()". + The "X-Forwarded-Port" header must contain the client port. + If your reverse proxy uses a different header name than "X-Forwarded-Port", + configure it via "setTrustedHeaderName()" with the "client-port" key. + * + * @static + * @return string + */ + public static function getPort(){} + + /** + * Returns the user. + * + * @static + * @return string|null + */ + public static function getUser(){} + + /** + * Returns the password. + * + * @static + * @return string|null + */ + public static function getPassword(){} + + /** + * Gets the user info. + * + * @static + * @return string A user name and, optionally, scheme-specific information about how to gain authorization to access the server + */ + public static function getUserInfo(){} + + /** + * Returns the HTTP host being requested. + The port name will be appended to the host if it's non-standard. + * + * @static + * @return string + */ + public static function getHttpHost(){} + + /** + * Returns the requested URI. + * + * @static + * @return string The raw URI (i.e. not urldecoded) + */ + public static function getRequestUri(){} + + /** + * Gets the scheme and HTTP host. + If the URL was called with basic authentication, the user + and the password are not added to the generated string. + * + * @static + * @return string The scheme and HTTP host + */ + public static function getSchemeAndHttpHost(){} + + /** + * Generates a normalized URI for the Request. + * + * @static + * @return string A normalized URI for the Request + */ + public static function getUri(){} + + /** + * Generates a normalized URI for the given path. + * + * @static + * @param string $path A path to use instead of the current one + * @return string The normalized URI for the path + */ + public static function getUriForPath($path){} + + /** + * Generates the normalized query string for the Request. + It builds a normalized query string, where keys/value pairs are alphabetized + and have consistent escaping. + * + * @static + * @return string|null A normalized query string for the Request + */ + public static function getQueryString(){} + + /** + * Checks whether the request is secure or not. + This method can read the client port from the "X-Forwarded-Proto" header + when trusted proxies were set via "setTrustedProxies()". + The "X-Forwarded-Proto" header must contain the protocol: "https" or "http". + If your reverse proxy uses a different header name than "X-Forwarded-Proto" + ("SSL_HTTPS" for instance), configure it via "setTrustedHeaderName()" with + the "client-proto" key. + * + * @static + * @return Boolean + */ + public static function isSecure(){} + + /** + * Returns the host name. + This method can read the client port from the "X-Forwarded-Host" header + when trusted proxies were set via "setTrustedProxies()". + The "X-Forwarded-Host" header must contain the client host name. + If your reverse proxy uses a different header name than "X-Forwarded-Host", + configure it via "setTrustedHeaderName()" with the "client-host" key. + * + * @static + * @return string + */ + public static function getHost(){} + + /** + * Sets the request method. + * + * @static + * @param string $method + * @return void + */ + public static function setMethod($method){} + + /** + * Gets the request "intended" method. + If the X-HTTP-Method-Override header is set, and if the method is a POST, + then it is used to determine the "real" intended HTTP method. + The _method request parameter can also be used to determine the HTTP method, + but only if enableHttpMethodParameterOverride() has been called. + The method is always an uppercased string. + * + * @static + * @return string The request method + */ + public static function getMethod(){} + + /** + * Gets the "real" request method. + * + * @static + * @return string The request method + */ + public static function getRealMethod(){} + + /** + * Gets the mime type associated with the format. + * + * @static + * @param string $format The format + * @return string The associated mime type (null if not found) + */ + public static function getMimeType($format){} + + /** + * Gets the format associated with the mime type. + * + * @static + * @param string $mimeType The associated mime type + * @return string|null The format (null if not found) + */ + public static function getFormat($mimeType){} + + /** + * Associates a format with mime types. + * + * @static + * @param string $format The format + * @param string|array $mimeTypes The associated mime types (the preferred one must be the first as it will be used as the content type) + * @return void + */ + public static function setFormat($format, $mimeTypes){} + + /** + * Gets the request format. + Here is the process to determine the format: + * format defined by the user (with setRequestFormat()) + * _format request parameter + * $default + * + * @static + * @param string $default The default format + * @return string The request format + */ + public static function getRequestFormat($default = 'html'){} + + /** + * Sets the request format. + * + * @static + * @param string $format The request format. + * @return void + */ + public static function setRequestFormat($format){} + + /** + * Gets the format associated with the request. + * + * @static + * @return string|null The format (null if no content type is present) + */ + public static function getContentType(){} + + /** + * Sets the default locale. + * + * @static + * @param string $locale + * @return void + */ + public static function setDefaultLocale($locale){} + + /** + * Sets the locale. + * + * @static + * @param string $locale + * @return void + */ + public static function setLocale($locale){} + + /** + * Get the locale. + * + * @static + * @return string + */ + public static function getLocale(){} + + /** + * Checks if the request method is of specified type. + * + * @static + * @param string $method Uppercase request method (GET, POST etc). + * @return Boolean + */ + public static function isMethod($method){} + + /** + * Checks whether the method is safe or not. + * + * @static + * @return Boolean + */ + public static function isMethodSafe(){} + + /** + * Returns the request body content. + * + * @static + * @param Boolean $asResource If true, a resource will be returned + * @return string|resource The request body content or a resource to read the body stream. + */ + public static function getContent($asResource = false){} + + /** + * Gets the Etags. + * + * @static + * @return array The entity tags + */ + public static function getETags(){} + + /** + * + * + * @static + * @return Boolean + */ + public static function isNoCache(){} + + /** + * Returns the preferred language. + * + * @static + * @param array $locales An array of ordered available locales + * @return string|null The preferred locale + */ + public static function getPreferredLanguage($locales = null){} + + /** + * Gets a list of languages acceptable by the client browser. + * + * @static + * @return array Languages ordered in the user browser preferences + */ + public static function getLanguages(){} + + /** + * Gets a list of charsets acceptable by the client browser. + * + * @static + * @return array List of charsets in preferable order + */ + public static function getCharsets(){} + + /** + * Gets a list of content types acceptable by the client browser + * + * @static + * @return array List of content types in preferable order + */ + public static function getAcceptableContentTypes(){} + + /** + * Returns true if the request is a XMLHttpRequest. + It works if your JavaScript library set an X-Requested-With HTTP header. + It is known to work with common JavaScript frameworks: + * + * @static + * @return Boolean true if the request is an XMLHttpRequest, false otherwise + */ + public static function isXmlHttpRequest(){} + + /** + * Splits an Accept-* HTTP header. + * + * @static + * @param string $header Header to split + * @return array Array indexed by the values of the Accept-* header in preferred order + */ + public static function splitHttpAcceptHeader($header){} + + /** + * + * + * @static + * @return void + */ + public static function prepareRequestUri(){} + + /** + * Prepares the base URL. + * + * @static + * @return string + */ + public static function prepareBaseUrl(){} + + /** + * Prepares the base path. + * + * @static + * @return string base path + */ + public static function prepareBasePath(){} + + /** + * Prepares the path info. + * + * @static + * @return string path info + */ + public static function preparePathInfo(){} + + /** + * Initializes HTTP request formats. + * + * @static + * @return void + */ + public static function initializeFormats(){} + + /** + * Sets the default PHP locale. + * + * @static + * @param string $locale + * @return void + */ + public static function setPhpDefaultLocale($locale){} + + /** + * + * + * @static + * @return void + */ + public static function getUrlencodedPrefix($string, $prefix){} + +} + +class Response extends Illuminate\Http\Response{ + /** + * Add a cookie to the response. + * + * @static + * @param Symfony\Component\HttpFoundation\Cookie $cookie + * @return Illuminate\Http\Response + */ + public static function withCookie($cookie){} + + /** + * Set the content on the response. + * + * @static + * @param mixed $content + * @return void + */ + public static function setContent($content){} + + /** + * Get the original response content. + * + * @static + * @return mixed + */ + public static function getOriginalContent(){} + + /** + * Constructor. + * + * @static + * @param string $content The response content + * @param integer $status The response status code + * @param array $headers An array of response headers + * @return void + */ + public static function __construct($content = '', $status = '200', $headers = array()){} + + /** + * Factory method for chainability + Example: + return Response::create($body, 200) + ->setSharedMaxAge(300); + * + * @static + * @param string $content The response content + * @param integer $status The response status code + * @param array $headers An array of response headers + * @return Response + */ + public static function create($content = '', $status = '200', $headers = array()){} + + /** + * Returns the Response as an HTTP string. + The string representation of the Response is the same as the + one that will be sent to the client only if the prepare() method + has been called before. + * + * @static + * @return string The Response as an HTTP string + */ + public static function __toString(){} + + /** + * Clones the current Response instance. + * + * @static + * @return void + */ + public static function __clone(){} + + /** + * Prepares the Response before it is sent to the client. + This method tweaks the Response to ensure that it is + compliant with RFC 2616. Most of the changes are based on + the Request that is "associated" with this Response. + * + * @static + * @param Request $request A Request instance + * @return Response The current response. + */ + public static function prepare($request){} + + /** + * Sends HTTP headers. + * + * @static + * @return Response + */ + public static function sendHeaders(){} + + /** + * Sends content for the current web response. + * + * @static + * @return Response + */ + public static function sendContent(){} + + /** + * Sends HTTP headers and content. + * + * @static + * @return Response + */ + public static function send(){} + + /** + * Gets the current response content. + * + * @static + * @return string Content + */ + public static function getContent(){} + + /** + * Sets the HTTP protocol version (1.0 or 1.1). + * + * @static + * @param string $version The HTTP protocol version + * @return Response + */ + public static function setProtocolVersion($version){} + + /** + * Gets the HTTP protocol version. + * + * @static + * @return string The HTTP protocol version + */ + public static function getProtocolVersion(){} + + /** + * Sets the response status code. + * + * @static + * @param integer $code HTTP status code + * @param mixed $text HTTP status text + If the status text is null it will be automatically populated for the known + status codes and left empty otherwise. + * @return Response + */ + public static function setStatusCode($code, $text = null){} + + /** + * Retrieves the status code for the current web response. + * + * @static + * @return integer Status code + */ + public static function getStatusCode(){} + + /** + * Sets the response charset. + * + * @static + * @param string $charset Character set + * @return Response + */ + public static function setCharset($charset){} + + /** + * Retrieves the response charset. + * + * @static + * @return string Character set + */ + public static function getCharset(){} + + /** + * Returns true if the response is worth caching under any circumstance. + Responses marked "private" with an explicit Cache-Control directive are + considered uncacheable. + Responses with neither a freshness lifetime (Expires, max-age) nor cache + validator (Last-Modified, ETag) are considered uncacheable. + * + * @static + * @return Boolean true if the response is worth caching, false otherwise + */ + public static function isCacheable(){} + + /** + * Returns true if the response is "fresh". + Fresh responses may be served from cache without any interaction with the + origin. A response is considered fresh when it includes a Cache-Control/max-age + indicator or Expires header and the calculated age is less than the freshness lifetime. + * + * @static + * @return Boolean true if the response is fresh, false otherwise + */ + public static function isFresh(){} + + /** + * Returns true if the response includes headers that can be used to validate + the response with the origin server using a conditional GET request. + * + * @static + * @return Boolean true if the response is validateable, false otherwise + */ + public static function isValidateable(){} + + /** + * Marks the response as "private". + It makes the response ineligible for serving other clients. + * + * @static + * @return Response + */ + public static function setPrivate(){} + + /** + * Marks the response as "public". + It makes the response eligible for serving other clients. + * + * @static + * @return Response + */ + public static function setPublic(){} + + /** + * Returns true if the response must be revalidated by caches. + This method indicates that the response must not be served stale by a + cache in any circumstance without first revalidating with the origin. + When present, the TTL of the response should not be overridden to be + greater than the value provided by the origin. + * + * @static + * @return Boolean true if the response must be revalidated by a cache, false otherwise + */ + public static function mustRevalidate(){} + + /** + * Returns the Date header as a DateTime instance. + * + * @static + * @return \DateTime A \DateTime instance + */ + public static function getDate(){} + + /** + * Sets the Date header. + * + * @static + * @param \DateTime $date A \DateTime instance + * @return Response + */ + public static function setDate($date){} + + /** + * Returns the age of the response. + * + * @static + * @return integer The age of the response in seconds + */ + public static function getAge(){} + + /** + * Marks the response stale by setting the Age header to be equal to the maximum age of the response. + * + * @static + * @return Response + */ + public static function expire(){} + + /** + * Returns the value of the Expires header as a DateTime instance. + * + * @static + * @return \DateTime|null A DateTime instance or null if the header does not exist + */ + public static function getExpires(){} + + /** + * Sets the Expires HTTP header with a DateTime instance. + Passing null as value will remove the header. + * + * @static + * @param \DateTime|null $date A \DateTime instance or null to remove the header + * @return Response + */ + public static function setExpires($date = null){} + + /** + * Returns the number of seconds after the time specified in the response's Date + header when the the response should no longer be considered fresh. + First, it checks for a s-maxage directive, then a max-age directive, and then it falls + back on an expires header. It returns null when no maximum age can be established. + * + * @static + * @return integer|null Number of seconds + */ + public static function getMaxAge(){} + + /** + * Sets the number of seconds after which the response should no longer be considered fresh. + This methods sets the Cache-Control max-age directive. + * + * @static + * @param integer $value Number of seconds + * @return Response + */ + public static function setMaxAge($value){} + + /** + * Sets the number of seconds after which the response should no longer be considered fresh by shared caches. + This methods sets the Cache-Control s-maxage directive. + * + * @static + * @param integer $value Number of seconds + * @return Response + */ + public static function setSharedMaxAge($value){} + + /** + * Returns the response's time-to-live in seconds. + It returns null when no freshness information is present in the response. + When the responses TTL is <= 0, the response may not be served from cache without first + revalidating with the origin. + * + * @static + * @return integer|null The TTL in seconds + */ + public static function getTtl(){} + + /** + * Sets the response's time-to-live for shared caches. + This method adjusts the Cache-Control/s-maxage directive. + * + * @static + * @param integer $seconds Number of seconds + * @return Response + */ + public static function setTtl($seconds){} + + /** + * Sets the response's time-to-live for private/client caches. + This method adjusts the Cache-Control/max-age directive. + * + * @static + * @param integer $seconds Number of seconds + * @return Response + */ + public static function setClientTtl($seconds){} + + /** + * Returns the Last-Modified HTTP header as a DateTime instance. + * + * @static + * @return \DateTime|null A DateTime instance or null if the header does not exist + */ + public static function getLastModified(){} + + /** + * Sets the Last-Modified HTTP header with a DateTime instance. + Passing null as value will remove the header. + * + * @static + * @param \DateTime|null $date A \DateTime instance or null to remove the header + * @return Response + */ + public static function setLastModified($date = null){} + + /** + * Returns the literal value of the ETag HTTP header. + * + * @static + * @return string|null The ETag HTTP header or null if it does not exist + */ + public static function getEtag(){} + + /** + * Sets the ETag value. + * + * @static + * @param string|null $etag The ETag unique identifier or null to remove the header + * @param Boolean $weak Whether you want a weak ETag or not + * @return Response + */ + public static function setEtag($etag = null, $weak = false){} + + /** + * Sets the response's cache headers (validation and/or expiration). + Available options are: etag, last_modified, max_age, s_maxage, private, and public. + * + * @static + * @param array $options An array of cache options + * @return Response + */ + public static function setCache($options){} + + /** + * Modifies the response so that it conforms to the rules defined for a 304 status code. + This sets the status, removes the body, and discards any headers + that MUST NOT be included in 304 responses. + * + * @static + * @return Response + */ + public static function setNotModified(){} + + /** + * Returns true if the response includes a Vary header. + * + * @static + * @return Boolean true if the response includes a Vary header, false otherwise + */ + public static function hasVary(){} + + /** + * Returns an array of header names given in the Vary header. + * + * @static + * @return array An array of Vary names + */ + public static function getVary(){} + + /** + * Sets the Vary header. + * + * @static + * @param string|array $headers + * @param Boolean $replace Whether to replace the actual value of not (true by default) + * @return Response + */ + public static function setVary($headers, $replace = true){} + + /** + * Determines if the Response validators (ETag, Last-Modified) match + a conditional value specified in the Request. + If the Response is not modified, it sets the status code to 304 and + removes the actual content by calling the setNotModified() method. + * + * @static + * @param Request $request A Request instance + * @return Boolean true if the Response validators match the Request, false otherwise + */ + public static function isNotModified($request){} + + /** + * Is response invalid? + * + * @static + * @return Boolean + */ + public static function isInvalid(){} + + /** + * Is response informative? + * + * @static + * @return Boolean + */ + public static function isInformational(){} + + /** + * Is response successful? + * + * @static + * @return Boolean + */ + public static function isSuccessful(){} + + /** + * Is the response a redirect? + * + * @static + * @return Boolean + */ + public static function isRedirection(){} + + /** + * Is there a client error? + * + * @static + * @return Boolean + */ + public static function isClientError(){} + + /** + * Was there a server side error? + * + * @static + * @return Boolean + */ + public static function isServerError(){} + + /** + * Is the response OK? + * + * @static + * @return Boolean + */ + public static function isOk(){} + + /** + * Is the response forbidden? + * + * @static + * @return Boolean + */ + public static function isForbidden(){} + + /** + * Is the response a not found error? + * + * @static + * @return Boolean + */ + public static function isNotFound(){} + + /** + * Is the response a redirect of some form? + * + * @static + * @param string $location + * @return Boolean + */ + public static function isRedirect($location = null){} + + /** + * Is the response empty? + * + * @static + * @return Boolean + */ + public static function isEmpty(){} + +} + +class Route extends Illuminate\Routing\Router{ + /** + * Create a new router instance. + * + * @static + * @param Illuminate\Container $container + * @return void + */ + public static function __construct($container = null){} + + /** + * Add a new route to the collection. + * + * @static + * @param string $pattern + * @param mixed $action + * @return Illuminate\Routing\Route + */ + public static function get($pattern, $action){} + + /** + * Add a new route to the collection. + * + * @static + * @param string $pattern + * @param mixed $action + * @return Illuminate\Routing\Route + */ + public static function post($pattern, $action){} + + /** + * Add a new route to the collection. + * + * @static + * @param string $pattern + * @param mixed $action + * @return Illuminate\Routing\Route + */ + public static function put($pattern, $action){} + + /** + * Add a new route to the collection. + * + * @static + * @param string $pattern + * @param mixed $action + * @return Illuminate\Routing\Route + */ + public static function patch($pattern, $action){} + + /** + * Add a new route to the collection. + * + * @static + * @param string $pattern + * @param mixed $action + * @return Illuminate\Routing\Route + */ + public static function delete($pattern, $action){} + + /** + * Add a new route to the collection. + * + * @static + * @param string $method + * @param string $pattern + * @param mixed $action + * @return Illuminate\Routing\Route + */ + public static function match($method, $pattern, $action){} + + /** + * Add a new route to the collection. + * + * @static + * @param string $pattern + * @param mixed $action + * @return Illuminate\Routing\Route + */ + public static function any($pattern, $action){} + + /** + * Register an array of controllers with wildcard routing. + * + * @static + * @param array $controllers + * @return void + */ + public static function controllers($controllers){} + + /** + * Route a controller to a URI with wildcard routing. + * + * @static + * @param string $uri + * @param string $controller + * @return Illuminate\Routing\Route + */ + public static function controller($uri, $controller){} + + /** + * Add a fallthrough route for a controller. + * + * @static + * @param string $controller + * @param string $uri + * @return void + */ + public static function addFallthroughRoute($controller, $uri){} + + /** + * Route a resource to a controller. + * + * @static + * @param string $resource + * @param string $controller + * @param array $options + * @return void + */ + public static function resource($resource, $controller, $options = array()){} + + /** + * Get the applicable resource methods. + * + * @static + * @param array $defaults + * @param array $options + * @return array + */ + public static function getResourceMethods($defaults, $options){} + + /** + * Add the index method for a resourceful route. + * + * @static + * @param string $name + * @param string $base + * @param string $controller + * @return void + */ + public static function addResourceIndex($name, $base, $controller){} + + /** + * Add the create method for a resourceful route. + * + * @static + * @param string $name + * @param string $base + * @param string $controller + * @return void + */ + public static function addResourceCreate($name, $base, $controller){} + + /** + * Add the store method for a resourceful route. + * + * @static + * @param string $name + * @param string $base + * @param string $controller + * @return void + */ + public static function addResourceStore($name, $base, $controller){} + + /** + * Add the show method for a resourceful route. + * + * @static + * @param string $name + * @param string $base + * @param string $controller + * @return void + */ + public static function addResourceShow($name, $base, $controller){} + + /** + * Add the edit method for a resourceful route. + * + * @static + * @param string $name + * @param string $base + * @param string $controller + * @return void + */ + public static function addResourceEdit($name, $base, $controller){} + + /** + * Add the update method for a resourceful route. + * + * @static + * @param string $name + * @param string $base + * @param string $controller + * @return void + */ + public static function addResourceUpdate($name, $base, $controller){} + + /** + * Add the update method for a resourceful route. + * + * @static + * @param string $name + * @param string $base + * @param string $controller + * @return void + */ + public static function addPutResourceUpdate($name, $base, $controller){} + + /** + * Add the update method for a resourceful route. + * + * @static + * @param string $name + * @param string $base + * @param string $controller + * @return void + */ + public static function addPatchResourceUpdate($name, $base, $controller){} + + /** + * Add the destroy method for a resourceful route. + * + * @static + * @param string $name + * @param string $base + * @param string $controller + * @return void + */ + public static function addResourceDestroy($name, $base, $controller){} + + /** + * Get the base resource URI for a given resource. + * + * @static + * @param string $resource + * @return string + */ + public static function getResourceUri($resource){} + + /** + * Get the action array for a resource route. + * + * @static + * @param string $resource + * @param string $controller + * @param string $method + * @return array + */ + public static function getResourceAction($resource, $controller, $method){} + + /** + * Get the resource prefix for a resource route. + * + * @static + * @param string $resource + * @param string $method + * @return string + */ + public static function getResourcePrefix($resource, $method){} + + /** + * Get the base resource from a resource name. + * + * @static + * @param string $resource + * @return string + */ + public static function getBaseResource($resource){} + + /** + * Create a route group with shared attributes. + * + * @static + * @param array $attributes + * @param Closure $callback + * @return void + */ + public static function group($attributes, $callback){} + + /** + * Update the group stack array. + * + * @static + * @param array $attributes + * @return void + */ + public static function updateGroupStack($attributes){} + + /** + * Create a new route instance. + * + * @static + * @param string $method + * @param string $pattern + * @param mixed $action + * @return Illuminate\Routing\Route + */ + public static function createRoute($method, $pattern, $action){} + + /** + * Parse the given route action into array form. + * + * @static + * @param mixed $action + * @return array + */ + public static function parseAction($action){} + + /** + * Merge the current group stack into a given action. + * + * @static + * @param array $action + * @param int $index + * @return array + */ + public static function mergeGroup($action, $index){} + + /** + * Get the full group prefix for the current stack. + * + * @static + * @return string + */ + public static function getGroupPrefix(){} + + /** + * Get the fully merged prefix for a given action. + * + * @static + * @param array $action + * @return string + */ + public static function mergeGroupPrefix($action){} + + /** + * Add the given prefix to the given URI pattern. + * + * @static + * @param string $pattern + * @param string $prefix + * @return string + */ + public static function addPrefix($pattern, $prefix){} + + /** + * Set the attributes and requirements on the route. + * + * @static + * @param Illuminate\Routing\Route $route + * @param array $action + * @param array $optional + * @return void + */ + public static function setAttributes($route, $action, $optional){} + + /** + * Modify the pattern and extract optional parameters. + * + * @static + * @param string $pattern + * @return array + */ + public static function getOptional($pattern){} + + /** + * Get the name of the route. + * + * @static + * @param string $method + * @param string $pattern + * @param array $action + * @return string + */ + public static function getName($method, $pattern, $action){} + + /** + * Get the callback from the given action array. + * + * @static + * @param array $action + * @return Closure + */ + public static function getCallback($action){} + + /** + * Create the controller callback for a route. + * + * @static + * @param string $attribute + * @return Closure + */ + public static function createControllerCallback($attribute){} + + /** + * Get the response for a given request. + * + * @static + * @param Symfony\Component\HttpFoundation\Request $request + * @return Symfony\Component\HttpFoundation\Response + */ + public static function dispatch($request){} + + /** + * Match the given request to a route object. + * + * @static + * @param Symfony\Component\HttpFoundation\Request $request + * @return Illuminate\Routing\Route + */ + public static function findRoute($request){} + + /** + * Format the request path info for routing. + * + * @static + * @param Illuminate\Http\Request $request + * @return string + */ + public static function formatRequestPath($request){} + + /** + * Register a "before" routing filter. + * + * @static + * @param Closure|string $callback + * @return void + */ + public static function before($callback){} + + /** + * Register an "after" routing filter. + * + * @static + * @param Closure|string $callback + * @return void + */ + public static function after($callback){} + + /** + * Register a "close" routing filter. + * + * @static + * @param Closure|string $callback + * @return void + */ + public static function close($callback){} + + /** + * Register a "finish" routing filters. + * + * @static + * @param Closure|string $callback + * @return void + */ + public static function finish($callback){} + + /** + * Build a global filter definition for the router. + * + * @static + * @param Closure|string $callback + * @return Closure + */ + public static function buildGlobalFilter($callback){} + + /** + * Register a new filter with the application. + * + * @static + * @param string $name + * @param Closure|string $callback + * @return void + */ + public static function addFilter($name, $callback){} + + /** + * Get a registered filter callback. + * + * @static + * @param string $name + * @return Closure + */ + public static function getFilter($name){} + + /** + * Get a callable array for a class based filter. + * + * @static + * @param string $filter + * @return array + */ + public static function getClassBasedFilter($filter){} + + /** + * Tie a registered filter to a URI pattern. + * + * @static + * @param string $pattern + * @param string|array $names + * @return void + */ + public static function matchFilter($pattern, $names){} + + /** + * Find the patterned filters matching a request. + * + * @static + * @param Illuminate\Foundation\Request $request + * @return array + */ + public static function findPatternFilters($request){} + + /** + * Call the "after" global filters. + * + * @static + * @param Symfony\Component\HttpFoundation\Request $request + * @param Symfony\Component\HttpFoundation\Response $response + * @return mixed + */ + public static function callAfterFilter($request, $response){} + + /** + * Call the "finish" global filter. + * + * @static + * @param Symfony\Component\HttpFoundation\Request $request + * @param Symfony\Component\HttpFoundation\Response $response + * @return mixed + */ + public static function callFinishFilter($request, $response){} + + /** + * Call a given global filter with the parameters. + * + * @static + * @param Symfony\Component\HttpFoundation\Request $request + * @param string $name + * @param array $parameters + * @return mixed + */ + public static function callGlobalFilter($request, $name, $parameters = array()){} + + /** + * Set a global where pattern on all routes + * + * @static + * @param string $key + * @param string $pattern + * @return void + */ + public static function pattern($key, $pattern){} + + /** + * Register a model binder for a wildcard. + * + * @static + * @param string $key + * @param string $class + * @return void + */ + public static function model($key, $class){} + + /** + * Register a custom parameter binder. + * + * @static + * @param string $key + * @param mixed $binder + * @return void + */ + public static function bind($key, $binder){} + + /** + * Determine if a given key has a registered binder. + * + * @static + * @param string $key + * @return bool + */ + public static function hasBinder($key){} + + /** + * Call a binder for a given wildcard. + * + * @static + * @param string $key + * @param mixed $value + * @param Illuminate\Routing\Route $route + * @return mixed + */ + public static function performBinding($key, $value, $route){} + + /** + * Prepare the given value as a Response object. + * + * @static + * @param mixed $value + * @param Illuminate\Foundation\Request $request + * @return Symfony\Component\HttpFoundation\Response + */ + public static function prepare($value, $request){} + + /** + * Convert routing exception to HttpKernel version. + * + * @static + * @param Exception $e + * @return void + */ + public static function handleRoutingException($e){} + + /** + * Determine if the current route has a given name. + * + * @static + * @param string $name + * @return bool + */ + public static function currentRouteNamed($name){} + + /** + * Determine if the current route uses a given controller action. + * + * @static + * @param string $action + * @return bool + */ + public static function currentRouteUses($action){} + + /** + * Determine if route filters are enabled. + * + * @static + * @return bool + */ + public static function filtersEnabled(){} + + /** + * Enable the running of filters. + * + * @static + * @return void + */ + public static function enableFilters(){} + + /** + * Disable the running of all filters. + * + * @static + * @return void + */ + public static function disableFilters(){} + + /** + * Retrieve the entire route collection. + * + * @static + * @return Symfony\Component\Routing\RouteCollection + */ + public static function getRoutes(){} + + /** + * Get the current request being dispatched. + * + * @static + * @return Symfony\Component\HttpFoundation\Request + */ + public static function getRequest(){} + + /** + * Get the current route being executed. + * + * @static + * @return Illuminate\Routing\Route + */ + public static function getCurrentRoute(){} + + /** + * Set the current route on the router. + * + * @static + * @param Illuminate\Routing\Route $route + * @return void + */ + public static function setCurrentRoute($route){} + + /** + * Get the filters defined on the router. + * + * @static + * @return array + */ + public static function getFilters(){} + + /** + * Get the global filters defined on the router. + * + * @static + * @return array + */ + public static function getGlobalFilters(){} + + /** + * Create a new URL matcher instance. + * + * @static + * @param Symfony\Component\HttpFoundation\Request $request + * @return Symfony\Component\Routing\Matcher\UrlMatcher + */ + public static function getUrlMatcher($request){} + + /** + * Get the controller inspector instance. + * + * @static + * @return Illuminate\Routing\Controllers\Inspector + */ + public static function getInspector(){} + + /** + * Set the controller inspector instance. + * + * @static + * @param Illuminate\Routing\Controllers\Inspector $inspector + * @return void + */ + public static function setInspector($inspector){} + + /** + * Get the container used by the router. + * + * @static + * @return Illuminate\Container\Container + */ + public static function getContainer(){} + + /** + * Set the container instance on the router. + * + * @static + * @param Illuminate\Container\Container $container + * @return void + */ + public static function setContainer($container){} + +} + +class Schema extends Illuminate\Database\Schema\Builder{ + /** + * Create a new database Schema manager. + * + * @static + * @param Illuminate\Database\Connection $connection + * @return void + */ + public static function __construct($connection){} + + /** + * Determine if the given table exists. + * + * @static + * @param string $table + * @return bool + */ + public static function hasTable($table){} + + /** + * Modify a table on the schema. + * + * @static + * @param string $table + * @param Closure $callback + * @return Illuminate\Database\Schema\Blueprint + */ + public static function table($table, $callback){} + + /** + * Create a new table on the schema. + * + * @static + * @param string $table + * @param Closure $callback + * @return Illuminate\Database\Schema\Blueprint + */ + public static function create($table, $callback){} + + /** + * Drop a table from the schema. + * + * @static + * @param string $table + * @return Illuminate\Database\Schema\Blueprint + */ + public static function drop($table){} + + /** + * Drop a table from the schema if it exists. + * + * @static + * @param string $table + * @return Illuminate\Database\Schema\Blueprint + */ + public static function dropIfExists($table){} + + /** + * Rename a table on the schema. + * + * @static + * @param string $from + * @param string $to + * @return Illuminate\Database\Schema\Blueprint + */ + public static function rename($from, $to){} + + /** + * Execute the blueprint to build / modify the table. + * + * @static + * @param Illuminate\Database\Schema\Blueprint $blueprint + * @return void + */ + public static function build($blueprint){} + + /** + * Create a new command set with a Closure. + * + * @static + * @param string $table + * @param Closure $callback + * @return Illuminate\Database\Schema\Blueprint + */ + public static function createBlueprint($table, $callback = null){} + + /** + * Get the database connection instance. + * + * @static + * @return Illuminate\Database\Connection + */ + public static function getConnection(){} + + /** + * Set the database connection instance. + * + * @static + * @param Illuminate\Database\Connection + * @return Illuminate\Database\Schema + */ + public static function setConnection($connection){} + +} + +class Seeder extends Illuminate\Database\Seeder{ + /** + * Run the database seeds. + * + * @static + * @return void + */ + public static function run(){} + + /** + * Seed the given connection from the given path. + * + * @static + * @param string $class + * @return void + */ + public static function call($class){} + + /** + * Resolve an instance of the given seeder class. + * + * @static + * @param string $class + * @return Illuminate\Database\Seeder + */ + public static function resolve($class){} + + /** + * Set the IoC container instance. + * + * @static + * @param Illuminate\Container\Container $container + * @return void + */ + public static function setContainer($container){} + +} + +class Session extends Illuminate\Support\Facades\Session{ + /** + * Get the registered name of the component. + * + * @static + * @return string + */ + public static function getFacadeAccessor(){} + + /** + * Hotswap the underlying instance behind the facade. + * + * @static + * @param mixed $instance + * @return void + */ + public static function swap($instance){} + + /** + * Initiate a mock expectation on the facade. + * + * @static + * @param dynamic + * @return Mockery\Expectation + */ + public static function shouldReceive(){} + + /** + * Get the root object behind the facade. + * + * @static + * @return mixed + */ + public static function getFacadeRoot(){} + + /** + * Resolve the facade root instance from the container. + * + * @static + * @param string $name + * @return mixed + */ + public static function resolveFacadeInstance($name){} + + /** + * Clear all of the resolved instances. + * + * @static + * @return void + */ + public static function clearResolvedInstances(){} + + /** + * Get the application instance behind the facade. + * + * @static + * @return Illuminate\Foundation\Application + */ + public static function getFacadeApplication(){} + + /** + * Set the application instance. + * + * @static + * @param Illuminate\Foundation\Application $app + * @return void + */ + public static function setFacadeApplication($app){} + + /** + * Handle dynamic, static calls to the object. + * + * @static + * @param string $method + * @param array $args + * @return mixed + */ + public static function __callStatic($method, $args){} + +} + +class Str extends Illuminate\Support\Str{ + /** + * Transliterate a UTF-8 value to ASCII. + * + * @static + * @param string $value + * @return string + */ + public static function ascii($value){} + + /** + * Convert a value to camel case. + * + * @static + * @param string $value + * @return string + */ + public static function camel($value){} + + /** + * Determine if a given string contains a given sub-string. + * + * @static + * @param string $haystack + * @param string|array $needle + * @return bool + */ + public static function contains($haystack, $needle){} + + /** + * Determine if a given string ends with a given needle. + * + * @static + * @param string $haystack + * @param string $needle + * @return bool + */ + public static function endsWith($haystack, $needle){} + + /** + * Cap a string with a single instance of a given value. + * + * @static + * @param string $value + * @param string $cap + * @return string + */ + public static function finish($value, $cap){} + + /** + * Determine if a given string matches a given pattern. + * + * @static + * @param string $pattern + * @param string $value + * @return bool + */ + public static function is($pattern, $value){} + + /** + * Limit the number of characters in a string. + * + * @static + * @param string $value + * @param int $limit + * @param string $end + * @return string + */ + public static function limit($value, $limit = '100', $end = '...'){} + + /** + * Get the plural form of an English word. + * + * @static + * @param string $value + * @param int $count + * @return string + */ + public static function plural($value, $count = '2'){} + + /** + * Generate a more truly "random" alpha-numeric string. + * + * @static + * @param int $length + * @return string + */ + public static function random($length = '16'){} + + /** + * Generate a "random" alpha-numeric string. + Should not be considered sufficient for cryptography, etc. + * + * @static + * @param int $length + * @return string + */ + public static function quickRandom($length = '16'){} + + /** + * Get the singular form of an English word. + * + * @static + * @param string $value + * @return string + */ + public static function singular($value){} + + /** + * Generate a URL friendly "slug" from a given string. + * + * @static + * @param string $title + * @param string $separator + * @return string + */ + public static function slug($title, $separator = '-'){} + + /** + * Convert a string to snake case. + * + * @static + * @param string $value + * @param string $delimiter + * @return string + */ + public static function snake($value, $delimiter = '_'){} + + /** + * Determine if a string starts with a given needle. + * + * @static + * @param string $haystack + * @param string|array $needle + * @return bool + */ + public static function startsWith($haystack, $needles){} + + /** + * Convert a value to studly caps case. + * + * @static + * @param string $value + * @return string + */ + public static function studly($value){} + +} + +class URL extends Illuminate\Routing\UrlGenerator{ + /** + * Create a new URL Generator instance. + * + * @static + * @param Symfony\Component\Routing\RouteCollection $routes + * @param Symfony\Component\HttpFoundation\Request $request + * @return void + */ + public static function __construct($routes, $request){} + + /** + * Get the current URL for the request. + * + * @static + * @return string + */ + public static function current(){} + + /** + * Get the URL for the previous request. + * + * @static + * @return string + */ + public static function previous(){} + + /** + * Generate a absolute URL to the given path. + * + * @static + * @param string $path + * @param array $parameters + * @param bool $secure + * @return string + */ + public static function to($path, $parameters = array(), $secure = null){} + + /** + * Generate a secure, absolute URL to the given path. + * + * @static + * @param string $path + * @return string + */ + public static function secure($path, $parameters = array()){} + + /** + * Generate a URL to an application asset. + * + * @static + * @param string $path + * @param bool $secure + * @return string + */ + public static function asset($path, $secure = null){} + + /** + * Generate a URL to a secure asset. + * + * @static + * @param string $path + * @return string + */ + public static function secureAsset($path){} + + /** + * Get the scheme for a raw URL. + * + * @static + * @param bool $secure + * @return string + */ + public static function getScheme($secure){} + + /** + * Get the URL to a named route. + * + * @static + * @param string $name + * @param array $parameters + * @param bool $absolute + * @return string + */ + public static function route($name, $parameters = array(), $absolute = true){} + + /** + * Determine if we're short circuiting the parameter list. + * + * @static + * @param array $parameters + * @return bool + */ + public static function usingQuickParameters($parameters){} + + /** + * Build the parameter list for short circuit parameters. + * + * @static + * @param Illuminate\Routing\Route $route + * @param array $params + * @return array + */ + public static function buildParameterList($route, $params){} + + /** + * Get the URL to a controller action. + * + * @static + * @param string $action + * @param array $parameters + * @param bool $absolute + * @return string + */ + public static function action($action, $parameters = array(), $absolute = true){} + + /** + * Get the base URL for the request. + * + * @static + * @param string $scheme + * @return string + */ + public static function getRootUrl($scheme){} + + /** + * Determine if the given path is a valid URL. + * + * @static + * @param string $path + * @return bool + */ + public static function isValidUrl($path){} + + /** + * Get the request instance. + * + * @static + * @return Symfony\Component\HttpFoundation\Request + */ + public static function getRequest(){} + + /** + * Set the current request instance. + * + * @static + * @param Symfony\Component\HttpFoundation\Request $request + * @return void + */ + public static function setRequest($request){} + + /** + * Get the Symfony URL generator instance. + * + * @static + * @return Symfony\Component\Routing\Generator\UrlGenerator + */ + public static function getGenerator(){} + + /** + * Get the Symfony URL generator instance. + * + * @static + * @param Symfony\Component\Routing\Generator\UrlGenerator $generator + * @return void + */ + public static function setGenerator($generator){} + +} + +class Validator extends Illuminate\Validation\Factory{ + /** + * Create a new Validator factory instance. + * + * @static + * @param Symfony\Component\Translation\TranslatorInterface $translator + * @return void + */ + public static function __construct($translator){} + + /** + * Create a new Validator instance. + * + * @static + * @param array $data + * @param array $rules + * @param array $messages + * @return Illuminate\Validation\Validator + */ + public static function make($data, $rules, $messages = array()){} + + /** + * Resolve a new Validator instance. + * + * @static + * @param array $data + * @param array $rules + * @param array $messages + * @return Illuminate\Validation\Validator + */ + public static function resolve($data, $rules, $messages){} + + /** + * Register a custom validator extension. + * + * @static + * @param string $rule + * @param Closure $extension + * @return void + */ + public static function extend($rule, $extension){} + + /** + * Register a custom implicit validator extension. + * + * @static + * @param string $rule + * @param Closure $extension + * @return void + */ + public static function extendImplicit($rule, $extension){} + + /** + * Set the Validator instance resolver. + * + * @static + * @param Closure $resolver + * @return void + */ + public static function resolver($resolver){} + + /** + * Get the Translator implementation. + * + * @static + * @return Symfony\Component\Translation\TranslatorInterface + */ + public static function getTranslator(){} + + /** + * Get the Presence Verifier implementation. + * + * @static + * @return Illuminate\Validation\PresenceVerifierInterface + */ + public static function getPresenceVerifier(){} + + /** + * Set the Presence Verifier implementation. + * + * @static + * @param Illuminate\Validation\PresenceVerifierInterface $presenceVerifier + * @return void + */ + public static function setPresenceVerifier($presenceVerifier){} + +} + +class View extends Illuminate\View\Environment{ + /** + * Create a new view environment instance. + * + * @static + * @param Illuminate\View\Engines\EngineResolver $engines + * @param Illuminate\View\ViewFinderInterface $finder + * @param Illuminate\Events\Dispatcher $events + * @return void + */ + public static function __construct($engines, $finder, $events){} + + /** + * Get a evaluated view contents for the given view. + * + * @static + * @param string $view + * @param array $data + * @return Illuminate\View\View + */ + public static function make($view, $data = array()){} + + /** + * Determine if a given view exists. + * + * @static + * @param string $view + * @return bool + */ + public static function exists($view){} + + /** + * Get the rendered contents of a partial from a loop. + * + * @static + * @param string $view + * @param array $data + * @param string $iterator + * @param string $empty + * @return string + */ + public static function renderEach($view, $data, $iterator, $empty = 'raw|'){} + + /** + * Get the appropriate view engine for the given path. + * + * @static + * @param string $path + * @return Illuminate\View\Engines\EngineInterface + */ + public static function getEngineFromPath($path){} + + /** + * Get the extension used by the view file. + * + * @static + * @param string $path + * @return string + */ + public static function getExtension($path){} + + /** + * Add a piece of shared data to the environment. + * + * @static + * @param string $key + * @param mixed $value + * @return void + */ + public static function share($key, $value){} + + /** + * Register a view composer event. + * + * @static + * @param array|string $views + * @param Closure|string $callback + * @return Closure + */ + public static function composer($views, $callback){} + + /** + * Add a composer for a given view. + * + * @static + * @param string $view + * @param Closure|string $callback + * @return Closure + */ + public static function addComposer($view, $callback){} + + /** + * Register a class based view composer. + * + * @static + * @param string $view + * @param string $class + * @return Closure + */ + public static function addClassComposer($view, $class){} + + /** + * Build a class based container callback Closure. + * + * @static + * @param string $class + * @return Closure + */ + public static function buildClassComposerCallback($class){} + + /** + * Parse a class based composer name. + * + * @static + * @param string $class + * @return array + */ + public static function parseClassComposer($class){} + + /** + * Call the composer for a given view. + * + * @static + * @param Illuminate\View\View $view + * @return void + */ + public static function callComposer($view){} + + /** + * Start injecting content into a section. + * + * @static + * @param string $section + * @param string $content + * @return void + */ + public static function startSection($section, $content = ''){} + + /** + * Inject inline content into a section. + * + * @static + * @param string $section + * @param string $content + * @return void + */ + public static function inject($section, $content){} + + /** + * Stop injecting content into a section and return its contents. + * + * @static + * @return string + */ + public static function yieldSection(){} + + /** + * Stop injecting content into a section. + * + * @static + * @return string + */ + public static function stopSection(){} + + /** + * Append content to a given section. + * + * @static + * @param string $section + * @param string $content + * @return void + */ + public static function extendSection($section, $content){} + + /** + * Get the string contents of a section. + * + * @static + * @param string $section + * @return string + */ + public static function yieldContent($section){} + + /** + * Flush all of the section contents. + * + * @static + * @return void + */ + public static function flushSections(){} + + /** + * Increment the rendering counter. + * + * @static + * @return void + */ + public static function incrementRender(){} + + /** + * Decrement the rendering counter. + * + * @static + * @return void + */ + public static function decrementRender(){} + + /** + * Check if there are no active render operations. + * + * @static + * @return bool + */ + public static function doneRendering(){} + + /** + * Add a location to the array of view locations. + * + * @static + * @param string $location + * @return void + */ + public static function addLocation($location){} + + /** + * Add a new namespace to the loader. + * + * @static + * @param string $namespace + * @param string|array $hints + * @return void + */ + public static function addNamespace($namespace, $hints){} + + /** + * Register a valid view extension and its engine. + * + * @static + * @param string $extension + * @param string $engine + * @param Closure $resolver + * @return void + */ + public static function addExtension($extension, $engine, $resolver = null){} + + /** + * Get the extension to engine bindings. + * + * @static + * @return array + */ + public static function getExtensions(){} + + /** + * Get the engine resolver instance. + * + * @static + * @return Illuminate\View\Engines\EngineResolver + */ + public static function getEngineResolver(){} + + /** + * Get the view finder instance. + * + * @static + * @return Illuminate\View\ViewFinder + */ + public static function getFinder(){} + + /** + * Get the event dispatcher instance. + * + * @static + * @return Illuminate\Events\Dispatcher + */ + public static function getDispatcher(){} + + /** + * Get the IoC container instance. + * + * @static + * @return Illuminate\Container + */ + public static function getContainer(){} + + /** + * Set the IoC container instance. + * + * @static + * @param Illuminate\Container $container + * @return void + */ + public static function setContainer($container){} + + /** + * Get all of the shared data for the environment. + * + * @static + * @return array + */ + public static function getShared(){} + + /** + * Get the entire array of sections. + * + * @static + * @return array + */ + public static function getSections(){} + +} + diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..088769f --- /dev/null +++ b/composer.json @@ -0,0 +1,21 @@ +{ + "name": "barryvdh/ide-helper", + "description": "", + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "require": { + "php": ">=5.3.0", + "illuminate/support": "4.0.x", + "dannykopping/docblock": "dev-master" + }, + "autoload": { + "psr-0": { + "Barryvdh\\IdeHelper": "src/" + } + }, + "minimum-stability": "dev" +} diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..03c30f0 --- /dev/null +++ b/readme.md @@ -0,0 +1,31 @@ +## Laravel IDE Helper & Generator + +### Complete phpDocs, directly from the source + +Add the _IDE_helper.php to your laravel folder (not in a public folder). The file isn't used by Laravel, but it has to be indexed by your IDE. +The file has been tested in PHPStorm 6. + +### Automatic phpDoc generation for Laravel Facades + +Require this package in your composer.json: + + "barryvdh/laravel-ide-helper": "dev-master" + +And add the ServiceProvider to the providers array in app/config/app.php + + 'Barryvdh\IdeHelper\IdeHelperServiceProvider', + +You can now re-generate the docs yourself (for future updates) in arisan + + php artisan ide-helper:generate + +You can also publish the config-file to add extra facades (ie. for bundles). + + php artisan config:publish barryvdh/ide-helper + +You can just add the Facade and the 'real' class, like the rest of the classes. + + 'Eloquent' => 'Illuminate\Database\Eloquent\Model', + + + diff --git a/src/Barryvdh/IdeHelper/GeneratorCommand.php b/src/Barryvdh/IdeHelper/GeneratorCommand.php new file mode 100644 index 0000000..9614d80 --- /dev/null +++ b/src/Barryvdh/IdeHelper/GeneratorCommand.php @@ -0,0 +1,128 @@ +argument('filename'); + + $aliases = \Config::get('ide-helper::aliases'); + $content = $this->parseDocBlocks($aliases); + + $written = \File::put($filename, $content); + + if($written !== false){ + $this->info("A new helper file was written to $filename"); + }else{ + $this->error("The helper file could not be created at $filename"); + } + + } + + /** + * Get the console command arguments. + * + * @return array + */ + protected function getArguments() + { + return array( + array('filename', InputArgument::OPTIONAL, 'The path to the helper file', \Config::get('ide-helper::filename')), + ); + } + + protected function parseDocBlocks($aliases){ + $d = new Parser(); + + $output = " $className){ + + $d->analyze($className); + $output .= "class $alias extends $className{\r\n"; + + $methods = $d->getMethods(); + + foreach ($methods as $method) + { + $returnAnnotations = $method->getAnnotations(array("return")); + if(!empty($returnAnnotations)){ + foreach ($returnAnnotations as $annotation) + { + $returnValue = $annotation->values[0]; + } + }else{ + $returnValue = 'void'; + } + + $annotations = $method->getAnnotations(array("param")); + + $output .= "/**\n * ".trim($method->description)."\n *\n * @static\n"; + $params = array(); + if(!empty($annotations)){ + foreach ($annotations as $annotation) + { + $output .=" * @param\t".implode($annotation->values, "\t")."\n"; + } + } + + $output .= " * @return ".$returnValue."\n */\n public static function ".$method->name."("; + + $reflection = $method->getReflectionObject(); + foreach ($reflection->getParameters() as $param) { + $paramStr = '$'.$param->getName(); + if ($param->isOptional()) { + $default = $param->getDefaultValue(); + if(is_bool($default)){ + $default = $default? 'true':'false'; + }elseif(is_array($default)){ + $default = 'array()'; + }elseif(is_null($default)){ + $default = 'null'; + }else{ + $default = "'".trim($default)."'"; + } + + $paramStr .= " = $default"; + } + $params[] = $paramStr; + } + $output .= implode($params, ", "); + + + $output .= "){}\n\n"; + + + } + $output .= "}\n\n"; + + } + + return $output; + } + +} diff --git a/src/Barryvdh/IdeHelper/IdeHelperServiceProvider.php b/src/Barryvdh/IdeHelper/IdeHelperServiceProvider.php new file mode 100644 index 0000000..864a596 --- /dev/null +++ b/src/Barryvdh/IdeHelper/IdeHelperServiceProvider.php @@ -0,0 +1,49 @@ +package('barryvdh/ide-helper'); + } + + /** + * Register the service provider. + * + * @return void + */ + public function register() + { + + $this->app['command.ide-helper.generate'] = $this->app->share(function($app) + { + return new GeneratorCommand; + }); + $this->commands('command.ide-helper.generate'); + } + + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides() + { + return array('command.ide-helper.generate'); + } + +} diff --git a/src/config/.gitkeep b/src/config/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/config/config.php b/src/config/config.php new file mode 100644 index 0000000..715c450 --- /dev/null +++ b/src/config/config.php @@ -0,0 +1,66 @@ + '_IDE_helper.php', + + /* + |-------------------------------------------------------------------------- + | Class Aliases + |-------------------------------------------------------------------------- + | + | This array of class aliases will be parsed and added to the helper file. + | + */ + + 'aliases' => array( + + 'App' => 'Illuminate\Foundation\Application', + 'Artisan' => 'Illuminate\Foundation\Artisan', + 'Auth' => 'Illuminate\Auth\Guard', + 'Blade' => 'Illuminate\View\Compilers\BladeCompiler', + 'Cache' => 'Illuminate\Cache\Store', + 'ClassLoader'=> 'Illuminate\Support\ClassLoader', + 'Config' => 'Illuminate\Config\Repository', + 'Controller'=> 'Illuminate\Routing\Controllers\Controller', + 'Cookie' => 'Illuminate\Cookie\CookieJar', + 'Crypt' => 'Illuminate\Encryption\Encrypter', + 'DB' => 'Illuminate\Database\Connection', + 'Eloquent' => 'Illuminate\Database\Eloquent\Model', + 'Event' => 'Illuminate\Events\Event', + 'File' => 'Illuminate\Filesystem\Filesystem', + 'Form' => 'Illuminate\Support\Facades\Form', + 'Hash' => 'Illuminate\Hashing\BcryptHasher', + 'Html' => 'Illuminate\Html\HtmlBuilder', + 'Input' => 'Illuminate\Http\Request', + 'Lang' => 'Illuminate\Translation\Translator', + 'Log' => 'Illuminate\Log\Writer', + 'Mail' => 'Illuminate\Mail\Mailer', + 'Paginator' => 'Illuminate\Pagination\Paginator', + 'Password' => 'Illuminate\Auth\Reminders\PasswordBroker', + 'Queue' => 'Illuminate\Queue\QueueManager', + 'Redirect' => 'Illuminate\Routing\Redirector', + 'Redis' => 'Illuminate\Redis\Database', + 'Request' => 'Illuminate\Http\Request', + 'Response' => 'Illuminate\Http\Response', + 'Route' => 'Illuminate\Routing\Router', + 'Schema' => 'Illuminate\Database\Schema\Builder', + 'Seeder' => 'Illuminate\Database\Seeder', + 'Session' => 'Illuminate\Support\Facades\Session', + 'Str' => 'Illuminate\Support\Str', + 'URL' => 'Illuminate\Routing\UrlGenerator', + 'Validator' => 'Illuminate\Validation\Factory', + 'View' => 'Illuminate\View\Environment', + + ), + +);