Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
7463c522
Commit
7463c522
authored
Sep 22, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added comments for language class.
parent
efed3b6e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
2 deletions
+55
-2
input.php
laravel/input.php
+32
-1
lang.php
laravel/lang.php
+23
-1
No files found.
laravel/input.php
View file @
7463c522
...
...
@@ -39,7 +39,7 @@ class Input {
/**
* Get all of the input data for the request.
*
* This method returns a merged array containing
$input->get() and $input->
files().
* This method returns a merged array containing
Input::get() and Input::
files().
*
* @return array
*/
...
...
@@ -51,6 +51,8 @@ class Input {
/**
* Determine if the input data contains an item.
*
* If the item is in the input array, but is an empty string, false will be returned.
*
* @param string $key
* @return bool
*/
...
...
@@ -64,6 +66,14 @@ class Input {
*
* This method should be used for all request methods (GET, POST, PUT, and DELETE).
*
* <code>
* // Get the "email" item from the input array
* $email = Input::get('email');
*
* // Return a default value if the specified item doesn't exist
* $email = Input::get('name', 'Taylor');
* </code>
*
* @param string $key
* @param mixed $default
* @return mixed
...
...
@@ -87,6 +97,14 @@ class Input {
/**
* Get input data from the previous request.
*
* <code>
* // Get the "email" item from the old input
* $email = Input::old('email');
*
* // Return a default value if the specified item doesn't exist
* $email = Input::old('name', 'Taylor');
* </code>
*
* @param string $key
* @param mixed $default
* @return string
...
...
@@ -106,6 +124,14 @@ class Input {
/**
* Get an item from the uploaded file data.
*
* <code>
* // Get the array of information for the "picture" upload
* $picture = Input::file('picture');
*
* // Get a specific element from the file array
* $size = Input::file('picture.size');
* </code>
*
* @param string $key
* @param mixed $default
* @return array
...
...
@@ -120,6 +146,11 @@ class Input {
*
* This method is simply a convenient wrapper around move_uploaded_file.
*
* <code>
* // Move the "picture" item from the $_FILES array to a permanent location
* Input::upload('picture', 'path/to/storage/picture.jpg');
* </code>
*
* @param string $key
* @param string $path
* @return bool
...
...
laravel/lang.php
View file @
7463c522
...
...
@@ -59,6 +59,14 @@ class Lang {
/**
* Create a new language line instance.
*
* <code>
* // Create a new language line instance for a given line
* $line = Lang::line('validation.required');
*
* // Specify some replacements for the language line
* $line = Lang::line('validation.required', array('attribute' => 'email'));
* </code>
*
* @param string $key
* @param array $replacements
* @param string $language
...
...
@@ -73,7 +81,21 @@ class Lang {
}
/**
* Get the language line.
* Get the language line as a string.
*
* If a language is specified, it should correspond to a directory within
* your application language directory.
*
* <code>
* // Get a language line
* $line = Lang::line('validation.required')->get();
*
* // Get a language line in a specified language
* $line = Lang::line('validation.required')->get('sp');
*
* // Return a default value if the line doesn't exist
* $line = Lang::line('validation.required', null, 'Default');
* </code>
*
* @param string $language
* @param string $default
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment