mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Update helpers
This commit is contained in:
+93
-49
@@ -100,7 +100,7 @@ namespace {
|
|||||||
* Register a service provider with the application.
|
* Register a service provider with the application.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @param Illuminate\Support\ServiceProvider $provider
|
* @param Illuminate\Support\ServiceProvider|string $provider
|
||||||
* @param array $options
|
* @param array $options
|
||||||
*/
|
*/
|
||||||
public static function register($provider, $options = array()){
|
public static function register($provider, $options = array()){
|
||||||
@@ -971,6 +971,40 @@ namespace {
|
|||||||
self::$realClass->put($key, $value, $minutes);
|
self::$realClass->put($key, $value, $minutes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store an item in the cache if the key does not exist.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @param string $key
|
||||||
|
* @param mixed $value
|
||||||
|
* @param int $minutes
|
||||||
|
*/
|
||||||
|
public static function add($key, $value, $minutes){
|
||||||
|
self::$realClass->add($key, $value, $minutes);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Increment the value at a given key.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @param string $key
|
||||||
|
* @param int $value
|
||||||
|
*/
|
||||||
|
public static function increment($key, $value = '1'){
|
||||||
|
self::$realClass->increment($key, $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decrement the value at a given key.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @param string $key
|
||||||
|
* @param int $value
|
||||||
|
*/
|
||||||
|
public static function decrement($key, $value = '1'){
|
||||||
|
self::$realClass->decrement($key, $value);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store an item in the cache indefinitely.
|
* Store an item in the cache indefinitely.
|
||||||
*
|
*
|
||||||
@@ -1067,28 +1101,6 @@ namespace {
|
|||||||
return self::$realClass->getMemory();
|
return self::$realClass->getMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the value of an item in memory.
|
|
||||||
*
|
|
||||||
* @static
|
|
||||||
* @param string $key
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public static function getFromMemory($key){
|
|
||||||
return self::$realClass->getFromMemory($key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the value of an item in memory.
|
|
||||||
*
|
|
||||||
* @static
|
|
||||||
* @param string $key
|
|
||||||
* @param mixed $value
|
|
||||||
*/
|
|
||||||
public static function setInMemory($key, $value){
|
|
||||||
self::$realClass->setInMemory($key, $value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if a cached value exists.
|
* Determine if a cached value exists.
|
||||||
*
|
*
|
||||||
@@ -1524,10 +1536,9 @@ namespace {
|
|||||||
* @static
|
* @static
|
||||||
* @param Symfony\Component\HttpFoundation\Request $request
|
* @param Symfony\Component\HttpFoundation\Request $request
|
||||||
* @param Illuminate\Encryption\Encrypter $encrypter
|
* @param Illuminate\Encryption\Encrypter $encrypter
|
||||||
* @param array $defaults
|
|
||||||
*/
|
*/
|
||||||
public static function __construct($request, $encrypter, $defaults){
|
public static function __construct($request, $encrypter){
|
||||||
self::$realClass->__construct($request, $encrypter, $defaults);
|
self::$realClass->__construct($request, $encrypter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1560,10 +1571,14 @@ namespace {
|
|||||||
* @param string $name
|
* @param string $name
|
||||||
* @param string $value
|
* @param string $value
|
||||||
* @param int $minutes
|
* @param int $minutes
|
||||||
|
* @param string $path
|
||||||
|
* @param string $domain
|
||||||
|
* @param bool $secure
|
||||||
|
* @param bool $httpOnly
|
||||||
* @return Symfony\Component\HttpFoundation\Cookie
|
* @return Symfony\Component\HttpFoundation\Cookie
|
||||||
*/
|
*/
|
||||||
public static function make($name, $value, $minutes = '0'){
|
public static function make($name, $value, $minutes = '0', $path = '/', $domain = null, $secure = false, $httpOnly = true){
|
||||||
return self::$realClass->make($name, $value, $minutes);
|
return self::$realClass->make($name, $value, $minutes, $path, $domain, $secure, $httpOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1572,10 +1587,14 @@ namespace {
|
|||||||
* @static
|
* @static
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param string $value
|
* @param string $value
|
||||||
|
* @param string $path
|
||||||
|
* @param string $domain
|
||||||
|
* @param bool $secure
|
||||||
|
* @param bool $httpOnly
|
||||||
* @return Symfony\Component\HttpFoundation\Cookie
|
* @return Symfony\Component\HttpFoundation\Cookie
|
||||||
*/
|
*/
|
||||||
public static function forever($name, $value){
|
public static function forever($name, $value, $path = '/', $domain = null, $secure = false, $httpOnly = true){
|
||||||
return self::$realClass->forever($name, $value);
|
return self::$realClass->forever($name, $value, $path, $domain, $secure, $httpOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1589,17 +1608,6 @@ namespace {
|
|||||||
return self::$realClass->forget($name);
|
return self::$realClass->forget($name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the value of a cookie option.
|
|
||||||
*
|
|
||||||
* @static
|
|
||||||
* @param string $option
|
|
||||||
* @param string $value
|
|
||||||
*/
|
|
||||||
public static function setDefault($option, $value){
|
|
||||||
self::$realClass->setDefault($option, $value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the request instance.
|
* Get the request instance.
|
||||||
*
|
*
|
||||||
@@ -1679,10 +1687,10 @@ namespace {
|
|||||||
* @param PDO $pdo
|
* @param PDO $pdo
|
||||||
* @param string $database
|
* @param string $database
|
||||||
* @param string $tablePrefix
|
* @param string $tablePrefix
|
||||||
* @param string $name
|
* @param array $config
|
||||||
*/
|
*/
|
||||||
public static function __construct($pdo, $database = '', $tablePrefix = '', $name = null){
|
public static function __construct($pdo, $database = '', $tablePrefix = '', $config = array()){
|
||||||
self::$realClass->__construct($pdo, $database, $tablePrefix, $name);
|
self::$realClass->__construct($pdo, $database, $tablePrefix, $config);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1903,6 +1911,17 @@ namespace {
|
|||||||
return self::$realClass->getName();
|
return self::$realClass->getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get an option from the configuration options.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @param string $option
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public static function getConfig($option){
|
||||||
|
return self::$realClass->getConfig($option);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the PDO driver name.
|
* Get the PDO driver name.
|
||||||
*
|
*
|
||||||
@@ -3550,7 +3569,7 @@ namespace {
|
|||||||
* Generate an ordered list of items.
|
* Generate an ordered list of items.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @param array $items
|
* @param array $list
|
||||||
* @param array $attributes
|
* @param array $attributes
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -3562,7 +3581,7 @@ namespace {
|
|||||||
* Generate an un-ordered list of items.
|
* Generate an un-ordered list of items.
|
||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @param array $items
|
* @param array $list
|
||||||
* @param array $attributes
|
* @param array $attributes
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -7449,6 +7468,18 @@ namespace {
|
|||||||
return self::$realClass->delete($pattern, $action);
|
return self::$realClass->delete($pattern, $action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a new route to the collection.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @param string $pattern
|
||||||
|
* @param mixed $action
|
||||||
|
* @return Illuminate\Routing\Route
|
||||||
|
*/
|
||||||
|
public static function options($pattern, $action){
|
||||||
|
return self::$realClass->options($pattern, $action);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a new route to the collection.
|
* Add a new route to the collection.
|
||||||
*
|
*
|
||||||
@@ -8180,6 +8211,19 @@ namespace {
|
|||||||
return self::$realClass->limit($value, $limit, $end);
|
return self::$realClass->limit($value, $limit, $end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Limit the number of words in a string.
|
||||||
|
*
|
||||||
|
* @static
|
||||||
|
* @param string $value
|
||||||
|
* @param int $words
|
||||||
|
* @param string $end
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function words($value, $words = '100', $end = '...'){
|
||||||
|
return self::$realClass->words($value, $words, $end);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the plural form of an English word.
|
* Get the plural form of an English word.
|
||||||
*
|
*
|
||||||
@@ -8319,7 +8363,7 @@ namespace {
|
|||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @param string $path
|
* @param string $path
|
||||||
* @param array $parameters
|
* @param mixed $parameters
|
||||||
* @param bool $secure
|
* @param bool $secure
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -8366,7 +8410,7 @@ namespace {
|
|||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param array $parameters
|
* @param mixed $parameters
|
||||||
* @param bool $absolute
|
* @param bool $absolute
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
@@ -8379,7 +8423,7 @@ namespace {
|
|||||||
*
|
*
|
||||||
* @static
|
* @static
|
||||||
* @param string $action
|
* @param string $action
|
||||||
* @param array $parameters
|
* @param mixed $parameters
|
||||||
* @param bool $absolute
|
* @param bool $absolute
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -28,8 +28,7 @@ You can just add the Facade and the 'real' class, like the rest of the classes.
|
|||||||
'Basset' => 'Basset\Basset',
|
'Basset' => 'Basset\Basset',
|
||||||
|
|
||||||
You can choose to include helper files. This is not enabled by default, but you can override this with the --helpers (-H) or --nohelpers (-N) option.
|
You can choose to include helper files. This is not enabled by default, but you can override this with the --helpers (-H) or --nohelpers (-N) option.
|
||||||
The Illuminate/Support/helpers.php and laravel/framework/preload/compiled.php are already set-up, but you can add/remove your own files in the config file.
|
The Illuminate/Support/helpers.php is already set-up, but you can add/remove your own files in the config file.
|
||||||
Using this option, allows you to have more complete code completion without having to include the vendor dir.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -108,7 +108,9 @@ class GeneratorCommand extends Command {
|
|||||||
|
|
||||||
if(!empty($helpers)){
|
if(!empty($helpers)){
|
||||||
foreach($helpers as $helper){
|
foreach($helpers as $helper){
|
||||||
$output .= str_replace(array('<?php', '?>'), '', \File::get($helper));
|
if (file_exists($helper)){
|
||||||
|
$output .= str_replace(array('<?php', '?>'), '', \File::get($helper));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ return array(
|
|||||||
|
|
||||||
'helper_files' => array(
|
'helper_files' => array(
|
||||||
base_path().'/vendor/laravel/framework/src/Illuminate/Support/helpers.php',
|
base_path().'/vendor/laravel/framework/src/Illuminate/Support/helpers.php',
|
||||||
base_path().'/vendor/laravel/framework/preload/compiled.php',
|
|
||||||
),
|
),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user