30 | {{ HTML::script('http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js') }}
31 | {{ HTML::script('laravel/js/prettify.js') }}
32 | {{ HTML::script('laravel/js/scroll.js') }}
33 |
34 |
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/laravel/auth/drivers/eloquent.php:
--------------------------------------------------------------------------------
1 | model()->find($id);
18 | }
19 | }
20 |
21 | /**
22 | * Attempt to log a user into the application.
23 | *
24 | * @param array $arguments
25 | * @return void
26 | */
27 | public function attempt($arguments = array())
28 | {
29 | $username = Config::get('auth.username');
30 |
31 | $user = $this->model()->where($username, '=', $arguments['username'])->first();
32 |
33 | // This driver uses a basic username and password authentication scheme
34 | // so if the credentials match what is in the database we will just
35 | // log the user into the application and remember them if asked.
36 | $password = $arguments['password'];
37 |
38 | $password_field = Config::get('auth.password', 'password');
39 |
40 | if ( ! is_null($user) and Hash::check($password, $user->get_attribute($password_field)))
41 | {
42 | return $this->login($user->id, array_get($arguments, 'remember'));
43 | }
44 |
45 | return false;
46 | }
47 |
48 | /**
49 | * Get a fresh model instance.
50 | *
51 | * @return Eloquent
52 | */
53 | protected function model()
54 | {
55 | $model = Config::get('auth.model');
56 |
57 | return new $model;
58 | }
59 |
60 | }
--------------------------------------------------------------------------------
/laravel/auth/drivers/fluent.php:
--------------------------------------------------------------------------------
1 | find($id);
22 | }
23 | }
24 |
25 | /**
26 | * Attempt to log a user into the application.
27 | *
28 | * @param array $arguments
29 | * @return void
30 | */
31 | public function attempt($arguments = array())
32 | {
33 | $user = $this->get_user($arguments['username']);
34 |
35 | // This driver uses a basic username and password authentication scheme
36 | // so if the credentials match what is in the database we will just
37 | // log the user into the application and remember them if asked.
38 | $password = $arguments['password'];
39 |
40 | $password_field = Config::get('auth.password', 'password');
41 |
42 | if ( ! is_null($user) and Hash::check($password, $user->{$password_field}))
43 | {
44 | return $this->login($user->id, array_get($arguments, 'remember'));
45 | }
46 |
47 | return false;
48 | }
49 |
50 | /**
51 | * Get the user from the database table by username.
52 | *
53 | * @param mixed $value
54 | * @return mixed
55 | */
56 | protected function get_user($value)
57 | {
58 | $table = Config::get('auth.table');
59 |
60 | $username = Config::get('auth.username');
61 |
62 | return DB::table($table)->where($username, '=', $value)->first();
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/laravel/cli/artisan.php:
--------------------------------------------------------------------------------
1 | getMessage();
47 | }
48 |
49 | echo PHP_EOL;
--------------------------------------------------------------------------------
/laravel/cli/tasks/bundle/providers/github.php:
--------------------------------------------------------------------------------
1 | move($path.'public', path('public').'bundles'.DS.$bundle);
27 |
28 | echo "Assets published for bundle [$bundle].".PHP_EOL;
29 | }
30 |
31 | /**
32 | * Copy the contents of a bundle's assets to the public folder.
33 | *
34 | * @param string $source
35 | * @param string $destination
36 | * @return void
37 | */
38 | protected function move($source, $destination)
39 | {
40 | File::cpdir($source, $destination);
41 | }
42 |
43 | /**
44 | * Get the "to" location of the bundle's assets.
45 | *
46 | * @param string $bundle
47 | * @return string
48 | */
49 | protected function to($bundle)
50 | {
51 | return path('public').'bundles'.DS.$bundle.DS;
52 | }
53 |
54 | /**
55 | * Get the "from" location of the bundle's assets.
56 | *
57 | * @param string $bundle
58 | * @return string
59 | */
60 | protected function from($bundle)
61 | {
62 | return Bundle::path($bundle).'public';
63 | }
64 |
65 | }
--------------------------------------------------------------------------------
/laravel/cli/tasks/bundle/repository.php:
--------------------------------------------------------------------------------
1 | api.$bundle);
25 |
26 | return json_decode($bundle, true);
27 | }
28 |
29 | }
--------------------------------------------------------------------------------
/laravel/cli/tasks/key.php:
--------------------------------------------------------------------------------
1 | path = path('app').'config/application'.EXT;
23 | }
24 |
25 | /**
26 | * Generate a random key for the application.
27 | *
28 | * @param array $arguments
29 | * @return void
30 | */
31 | public function generate($arguments = array())
32 | {
33 | // By default the Crypter class uses AES-256 encryption which uses
34 | // a 32 byte input vector, so that is the length of string we will
35 | // generate for the application token unless another length is
36 | // specified through the CLI.
37 | $key = Str::random(array_get($arguments, 0, 32));
38 |
39 | $config = File::get($this->path);
40 |
41 | $config = str_replace("'key' => '',", "'key' => '{$key}',", $config, $count);
42 |
43 | File::put($this->path, $config);
44 |
45 | if ($count > 0)
46 | {
47 | echo "Configuration updated with secure key!";
48 | }
49 | else
50 | {
51 | echo "An application key already exists!";
52 | }
53 |
54 | echo PHP_EOL;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/laravel/cli/tasks/migrate/stub.php:
--------------------------------------------------------------------------------
1 | route();
30 |
31 | echo PHP_EOL;
32 | }
33 |
34 | /**
35 | * Dump the results of the currently established route.
36 | *
37 | * @return void
38 | */
39 | protected function route()
40 | {
41 | // We'll call the router using the method and URI specified by
42 | // the developer on the CLI. If a route is found, we will not
43 | // run the filters, but simply dump the result.
44 | $route = Router::route(Request::method(), URI::current());
45 |
46 | if ( ! is_null($route))
47 | {
48 | var_dump($route->response());
49 | }
50 | else
51 | {
52 | echo '404: Not Found';
53 | }
54 | }
55 |
56 | }
--------------------------------------------------------------------------------
/laravel/cli/tasks/session/migration.php:
--------------------------------------------------------------------------------
1 | create();
15 |
16 | // The session table consists simply of an ID, a UNIX timestamp to
17 | // indicate the expiration time, and a blob field which will hold
18 | // the serialized form of the session payload.
19 | $table->string('id')->length(40)->primary('session_primary');
20 |
21 | $table->integer('last_activity');
22 |
23 | $table->text('data');
24 | });
25 | }
26 |
27 | /**
28 | * Revert the changes to the database.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::table(Config::get('session.table'), function($table)
35 | {
36 | $table->drop();
37 | });
38 | }
39 |
40 | }
--------------------------------------------------------------------------------
/laravel/cli/tasks/task.php:
--------------------------------------------------------------------------------
1 |
8 | * @link http://laravel.com
9 | */
10 |
11 | // --------------------------------------------------------------
12 | // Define the directory separator for the environment.
13 | // --------------------------------------------------------------
14 | define('DS', DIRECTORY_SEPARATOR);
15 |
16 | // --------------------------------------------------------------
17 | // Set the core Laravel path constants.
18 | // --------------------------------------------------------------
19 | require 'paths.php';
20 |
21 | // --------------------------------------------------------------
22 | // Override the application paths when testing the core.
23 | // --------------------------------------------------------------
24 | $config = file_get_contents('phpunit.xml');
25 |
26 | if (strpos($config, 'laravel-tests') !== false)
27 | {
28 | $path = path('bundle').'laravel-tests'.DS;
29 |
30 | set_path('app', $path.'application'.DS);
31 |
32 | set_path('bundle', $path.'bundles'.DS);
33 |
34 | set_path('storage', $path.'storage'.DS);
35 | }
36 |
37 | // --------------------------------------------------------------
38 | // Bootstrap the Laravel core.
39 | // --------------------------------------------------------------
40 | require path('sys').'core.php';
41 |
42 | // --------------------------------------------------------------
43 | // Start the default bundle.
44 | // --------------------------------------------------------------
45 | Laravel\Bundle::start(DEFAULT_BUNDLE);
--------------------------------------------------------------------------------
/laravel/cli/tasks/test/stub.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 | {{directory}}
7 |
8 |
9 |
--------------------------------------------------------------------------------
/laravel/database/connectors/connector.php:
--------------------------------------------------------------------------------
1 | PDO::CASE_LOWER,
12 | PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
13 | PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL,
14 | PDO::ATTR_STRINGIFY_FETCHES => false,
15 | PDO::ATTR_EMULATE_PREPARES => false,
16 | );
17 |
18 | /**
19 | * Establish a PDO database connection.
20 | *
21 | * @param array $config
22 | * @return PDO
23 | */
24 | abstract public function connect($config);
25 |
26 | /**
27 | * Get the PDO connection options for the configuration.
28 | *
29 | * Developer specified options will override the default connection options.
30 | *
31 | * @param array $config
32 | * @return array
33 | */
34 | protected function options($config)
35 | {
36 | $options = (isset($config['options'])) ? $config['options'] : array();
37 |
38 | return $this->options + $options;
39 | }
40 |
41 | }
--------------------------------------------------------------------------------
/laravel/database/connectors/mysql.php:
--------------------------------------------------------------------------------
1 | options($config));
34 |
35 | // If a character set has been specified, we'll execute a query against
36 | // the database to set the correct character set. By default, this is
37 | // set to UTF-8 which should be fine for most scenarios.
38 | if (isset($config['charset']))
39 | {
40 | $connection->prepare("SET NAMES '{$config['charset']}'")->execute();
41 | }
42 |
43 | return $connection;
44 | }
45 |
46 | }
--------------------------------------------------------------------------------
/laravel/database/connectors/postgres.php:
--------------------------------------------------------------------------------
1 | PDO::CASE_LOWER,
12 | PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
13 | PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL,
14 | PDO::ATTR_STRINGIFY_FETCHES => false,
15 | );
16 |
17 | /**
18 | * Establish a PDO database connection.
19 | *
20 | * @param array $config
21 | * @return PDO
22 | */
23 | public function connect($config)
24 | {
25 | extract($config);
26 |
27 | $dsn = "pgsql:host={$host};dbname={$database}";
28 |
29 | // The developer has the freedom of specifying a port for the PostgresSQL
30 | // database or the default port (5432) will be used by PDO to create the
31 | // connection to the database for the developer.
32 | if (isset($config['port']))
33 | {
34 | $dsn .= ";port={$config['port']}";
35 | }
36 |
37 | $connection = new PDO($dsn, $username, $password, $this->options($config));
38 |
39 | // If a character set has been specified, we'll execute a query against
40 | // the database to set the correct character set. By default, this is
41 | // set to UTF-8 which should be fine for most scenarios.
42 | if (isset($config['charset']))
43 | {
44 | $connection->prepare("SET NAMES '{$config['charset']}'")->execute();
45 | }
46 |
47 | return $connection;
48 | }
49 |
50 | }
--------------------------------------------------------------------------------
/laravel/database/connectors/sqlite.php:
--------------------------------------------------------------------------------
1 | options($config);
14 |
15 | // SQLite provides supported for "in-memory" databases, which exist only for
16 | // lifetime of the request. Any given in-memory database may only have one
17 | // PDO connection open to it at a time. These are mainly for tests.
18 | if ($config['database'] == ':memory:')
19 | {
20 | return new PDO('sqlite::memory:', null, null, $options);
21 | }
22 |
23 | $path = path('storage').'database'.DS.$config['database'].'.sqlite';
24 |
25 | return new PDO('sqlite:'.$path, null, null, $options);
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/laravel/database/connectors/sqlserver.php:
--------------------------------------------------------------------------------
1 | PDO::CASE_LOWER,
12 | PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
13 | PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL,
14 | PDO::ATTR_STRINGIFY_FETCHES => false,
15 | );
16 |
17 | /**
18 | * Establish a PDO database connection.
19 | *
20 | * @param array $config
21 | * @return PDO
22 | */
23 | public function connect($config)
24 | {
25 | extract($config);
26 |
27 | // Format the SQL Server connection string. This connection string format can
28 | // also be used to connect to Azure SQL Server databases. The port is defined
29 | // directly after the server name, so we'll create that first.
30 | $port = (isset($port)) ? ','.$port : '';
31 |
32 | $dsn = "sqlsrv:Server={$host}{$port};Database={$database}";
33 |
34 | return new PDO($dsn, $username, $password, $this->options($config));
35 | }
36 |
37 | }
--------------------------------------------------------------------------------
/laravel/database/eloquent/pivot.php:
--------------------------------------------------------------------------------
1 | pivot_table = $table;
29 | $this->connection = $connection;
30 |
31 | parent::__construct(array(), true);
32 | }
33 |
34 | /**
35 | * Get the name of the pivot table.
36 | *
37 | * @return string
38 | */
39 | public function table()
40 | {
41 | return $this->pivot_table;
42 | }
43 |
44 | /**
45 | * Get the connection used by the pivot table.
46 | *
47 | * @return string
48 | */
49 | public function connection()
50 | {
51 | return $this->connection;
52 | }
53 |
54 | }
--------------------------------------------------------------------------------
/laravel/database/eloquent/relationships/has_one.php:
--------------------------------------------------------------------------------
1 | relationships[$relationship] = null;
27 | }
28 | }
29 |
30 | /**
31 | * Match eagerly loaded child models to their parent models.
32 | *
33 | * @param array $parents
34 | * @param array $children
35 | * @return void
36 | */
37 | public function match($relationship, &$parents, $children)
38 | {
39 | $foreign = $this->foreign_key();
40 |
41 | foreach ($parents as &$parent)
42 | {
43 | $matching = array_first($children, function($k, $v) use (&$parent, $foreign)
44 | {
45 | return $v->$foreign == $parent->get_key();
46 | });
47 |
48 | $parent->relationships[$relationship] = $matching;
49 | }
50 | }
51 |
52 | }
--------------------------------------------------------------------------------
/laravel/database/eloquent/relationships/has_one_or_many.php:
--------------------------------------------------------------------------------
1 | attributes : $attributes;
16 |
17 | $attributes[$this->foreign_key()] = $this->base->get_key();
18 |
19 | return $this->model->create($attributes);
20 | }
21 |
22 | /**
23 | * Update a record for the association.
24 | *
25 | * @param array $attributes
26 | * @return bool
27 | */
28 | public function update(array $attributes)
29 | {
30 | if ($this->model->timestamps())
31 | {
32 | $attributes['updated_at'] = new \DateTime;
33 | }
34 |
35 | return $this->table->update($attributes);
36 | }
37 |
38 | /**
39 | * Set the proper constraints on the relationship table.
40 | *
41 | * @return void
42 | */
43 | protected function constrain()
44 | {
45 | $this->table->where($this->foreign_key(), '=', $this->base->get_key());
46 | }
47 |
48 | /**
49 | * Set the proper constraints on the relationship table for an eager load.
50 | *
51 | * @param array $results
52 | * @return void
53 | */
54 | public function eagerly_constrain($results)
55 | {
56 | $this->table->where_in($this->foreign_key(), $this->keys($results));
57 | }
58 |
59 | }
--------------------------------------------------------------------------------
/laravel/database/exception.php:
--------------------------------------------------------------------------------
1 | inner = $inner;
23 |
24 | $this->setMessage($sql, $bindings);
25 | }
26 |
27 | /**
28 | * Set the exception message to include the SQL and bindings.
29 | *
30 | * @param string $sql
31 | * @param array $bindings
32 | * @return void
33 | */
34 | protected function setMessage($sql, $bindings)
35 | {
36 | $this->message = $this->inner->getMessage();
37 |
38 | $this->message .= "\n\nSQL: ".$sql."\n\nBindings: ".var_export($bindings, true);
39 | }
40 |
41 | }
--------------------------------------------------------------------------------
/laravel/database/expression.php:
--------------------------------------------------------------------------------
1 | value = $value;
21 | }
22 |
23 | /**
24 | * Get the string value of the database expression.
25 | *
26 | * @return string
27 | */
28 | public function get()
29 | {
30 | return $this->value;
31 | }
32 |
33 | /**
34 | * Get the string value of the database expression.
35 | *
36 | * @return string
37 | */
38 | public function __toString()
39 | {
40 | return $this->get();
41 | }
42 |
43 | }
--------------------------------------------------------------------------------
/laravel/database/query/grammars/mysql.php:
--------------------------------------------------------------------------------
1 | insert($query, $values)." RETURNING $column";
18 | }
19 |
20 | }
--------------------------------------------------------------------------------
/laravel/database/query/grammars/sqlite.php:
--------------------------------------------------------------------------------
1 | orderings as $ordering)
17 | {
18 | $sql[] = $this->wrap($ordering['column']).' COLLATE NOCASE '.strtoupper($ordering['direction']);
19 | }
20 |
21 | return 'ORDER BY '.implode(', ', $sql);
22 | }
23 |
24 | }
--------------------------------------------------------------------------------
/laravel/database/query/join.php:
--------------------------------------------------------------------------------
1 | type = $type;
36 | $this->table = $table;
37 | }
38 |
39 | /**
40 | * Add an ON clause to the join.
41 | *
42 | * @param string $column1
43 | * @param string $operator
44 | * @param string $column2
45 | * @param string $connector
46 | * @return Join
47 | */
48 | public function on($column1, $operator, $column2, $connector = 'AND')
49 | {
50 | $this->clauses[] = compact('column1', 'operator', 'column2', 'connector');
51 |
52 | return $this;
53 | }
54 |
55 | /**
56 | * Add an OR ON clause to the join.
57 | *
58 | * @param string $column1
59 | * @param string $operator
60 | * @param string $column2
61 | * @return Join
62 | */
63 | public function or_on($column1, $operator, $column2)
64 | {
65 | return $this->on($column1, $operator, $column2, 'OR');
66 | }
67 |
68 | }
--------------------------------------------------------------------------------
/laravel/documentation/config.md:
--------------------------------------------------------------------------------
1 | # Runtime Configuration
2 |
3 | ## Contents
4 |
5 | - [The Basics](#the-basics)
6 | - [Retrieving Options](#retrieving-options)
7 | - [Setting Options](#setting-options)
8 |
9 |
10 | ## The Basics
11 |
12 | Sometimes you may need to get and set configuration options at runtime. For this you'll use the **Config** class, which utilizes Laravel's "dot" syntax for accessing configuration files and items.
13 |
14 |
15 | ## Retrieving Options
16 |
17 | #### Retrieve a configuration option:
18 |
19 | $value = Config::get('application.url');
20 |
21 | #### Return a default value if the option doesn't exist:
22 |
23 | $value = Config::get('application.timezone', 'UTC');
24 |
25 | #### Retrieve an entire configuration array:
26 |
27 | $options = Config::get('database');
28 |
29 |
30 | ## Setting Options
31 |
32 | #### Set a configuration option:
33 |
34 | Config::set('cache.driver', 'apc');
--------------------------------------------------------------------------------
/laravel/documentation/database/raw.md:
--------------------------------------------------------------------------------
1 | # Raw Queries
2 |
3 | ## Contents
4 |
5 | - [The Basics](#the-basics)
6 | - [Other Query Methods](#other-query-methods)
7 | - [PDO Connections](#pdo-connections)
8 |
9 |
10 | ## The Basics
11 |
12 | The **query** method is used to execute arbitrary, raw SQL against your database connection.
13 |
14 | #### Selecting records from the database:
15 |
16 | $users = DB::query('select * from users');
17 |
18 | #### Selecting records from the database using bindings:
19 |
20 | $users = DB::query('select * from users where name = ?', array('test'));
21 |
22 | #### Inserting a record into the database
23 |
24 | $success = DB::query('insert into users values (?, ?)', $bindings);
25 |
26 | #### Updating table records and getting the number of affected rows:
27 |
28 | $affected = DB::query('update users set name = ?', $bindings);
29 |
30 | #### Deleting from a table and getting the number of affected rows:
31 |
32 | $affected = DB::query('delete from users where id = ?', array(1));
33 |
34 |
35 | ## Other Query Methods
36 |
37 | Laravel provides a few other methods to make querying your database simple. Here's an overview:
38 |
39 | #### Running a SELECT query and returning the first result:
40 |
41 | $user = DB::first('select * from users where id = 1');
42 |
43 | #### Running a SELECT query and getting the value of a single column:
44 |
45 | $email = DB::only('select email from users where id = 1');
46 |
47 |
48 | ## PDO Connections
49 |
50 | Sometimes you may wish to access the raw PDO connection behind the Laravel Connection object.
51 |
52 | #### Get the raw PDO connection for a database:
53 |
54 | $pdo = DB::connection('sqlite')->pdo;
55 |
56 | > **Note:** If no connection name is specified, the **default** connection will be returned.
--------------------------------------------------------------------------------
/laravel/documentation/encryption.md:
--------------------------------------------------------------------------------
1 | # Encryption
2 |
3 | ## Contents
4 |
5 | - [The Basics](#the-basics)
6 | - [Encrypting A String](#encrypt)
7 | - [Decrypting A String](#decrypt)
8 |
9 |
10 | ## The Basics
11 |
12 | Laravel's **Crypter** class provides a simple interface for handling secure, two-way encryption. By default, the Crypter class provides strong AES-256 encryption and decryption out of the box via the Mcrypt PHP extension.
13 |
14 | > **Note:** Don't forget to install the Mcrypt PHP extension on your server.
15 |
16 |
17 | ## Encrypting A String
18 |
19 | #### Encrypting a given string:
20 |
21 | $encrypted = Crypter::encrypt($value);
22 |
23 |
24 | ## Decrypting A String
25 |
26 | #### Decrypting a string:
27 |
28 | $decrypted = Crypter::decrypt($encrypted);
29 |
30 | > **Note:** It's incredibly important to point out that the decrypt method will only decrypt strings that were encrypted using **your** application key.
--------------------------------------------------------------------------------
/laravel/hash.php:
--------------------------------------------------------------------------------
1 |
9 | * // Create a Bcrypt hash of a value
10 | * $hash = Hash::make('secret');
11 | *
12 | * // Use a specified number of iterations when creating the hash
13 | * $hash = Hash::make('secret', 12);
14 | *
15 | *
16 | * @param string $value
17 | * @param int $rounds
18 | * @return string
19 | */
20 | public static function make($value, $rounds = 8)
21 | {
22 | $work = str_pad($rounds, 2, '0', STR_PAD_LEFT);
23 |
24 | // Bcrypt expects the salt to be 22 base64 encoded characters including
25 | // dots and slashes. We will get rid of the plus signs included in the
26 | // base64 data and replace them with dots.
27 | if (function_exists('openssl_random_pseudo_bytes'))
28 | {
29 | $salt = openssl_random_pseudo_bytes(16);
30 | }
31 | else
32 | {
33 | $salt = Str::random(40);
34 | }
35 |
36 | $salt = substr(strtr(base64_encode($salt), '+', '.'), 0 , 22);
37 |
38 | return crypt($value, '$2a$'.$work.'$'.$salt);
39 | }
40 |
41 | /**
42 | * Determine if an unhashed value matches a Bcrypt hash.
43 | *
44 | * @param string $value
45 | * @param string $hash
46 | * @return bool
47 | */
48 | public static function check($value, $hash)
49 | {
50 | return crypt($value, $hash) === $hash;
51 | }
52 |
53 | }
--------------------------------------------------------------------------------
/laravel/memcached.php:
--------------------------------------------------------------------------------
1 |
16 | * // Get the Memcache connection and get an item from the cache
17 | * $name = Memcached::connection()->get('name');
18 | *
19 | * // Get the Memcache connection and place an item in the cache
20 | * Memcached::connection()->set('name', 'Taylor');
21 | *
22 | *
23 | * @return Memcached
24 | */
25 | public static function connection()
26 | {
27 | if (is_null(static::$connection))
28 | {
29 | static::$connection = static::connect(Config::get('cache.memcached'));
30 | }
31 |
32 | return static::$connection;
33 | }
34 |
35 | /**
36 | * Create a new Memcached connection instance.
37 | *
38 | * @param array $servers
39 | * @return Memcached
40 | */
41 | protected static function connect($servers)
42 | {
43 | $memcache = new \Memcached;
44 |
45 | foreach ($servers as $server)
46 | {
47 | $memcache->addServer($server['host'], $server['port'], $server['weight']);
48 | }
49 |
50 | if ($memcache->getVersion() === false)
51 | {
52 | throw new \Exception('Could not establish memcached connection.');
53 | }
54 |
55 | return $memcache;
56 | }
57 |
58 | /**
59 | * Dynamically pass all other method calls to the Memcache instance.
60 | *
61 | *
62 | * // Get an item from the Memcache instance
63 | * $name = Memcached::get('name');
64 | *
65 | * // Store data on the Memcache server
66 | * Memcached::set('name', 'Taylor');
67 | *
68 | */
69 | public static function __callStatic($method, $parameters)
70 | {
71 | return call_user_func_array(array(static::instance(), $method), $parameters);
72 | }
73 |
74 | }
--------------------------------------------------------------------------------
/laravel/session/drivers/apc.php:
--------------------------------------------------------------------------------
1 | apc = $apc;
21 | }
22 |
23 | /**
24 | * Load a session from storage by a given ID.
25 | *
26 | * If no session is found for the ID, null will be returned.
27 | *
28 | * @param string $id
29 | * @return array
30 | */
31 | public function load($id)
32 | {
33 | return $this->apc->get($id);
34 | }
35 |
36 | /**
37 | * Save a given session to storage.
38 | *
39 | * @param array $session
40 | * @param array $config
41 | * @param bool $exists
42 | * @return void
43 | */
44 | public function save($session, $config, $exists)
45 | {
46 | $this->apc->put($session['id'], $session, $config['lifetime']);
47 | }
48 |
49 | /**
50 | * Delete a session from storage by a given ID.
51 | *
52 | * @param string $id
53 | * @return void
54 | */
55 | public function delete($id)
56 | {
57 | $this->apc->forget($id);
58 | }
59 |
60 | }
--------------------------------------------------------------------------------
/laravel/session/drivers/cookie.php:
--------------------------------------------------------------------------------
1 | memcached = $memcached;
21 | }
22 |
23 | /**
24 | * Load a session from storage by a given ID.
25 | *
26 | * If no session is found for the ID, null will be returned.
27 | *
28 | * @param string $id
29 | * @return array
30 | */
31 | public function load($id)
32 | {
33 | return $this->memcached->get($id);
34 | }
35 |
36 | /**
37 | * Save a given session to storage.
38 | *
39 | * @param array $session
40 | * @param array $config
41 | * @param bool $exists
42 | * @return void
43 | */
44 | public function save($session, $config, $exists)
45 | {
46 | $this->memcached->put($session['id'], $session, $config['lifetime']);
47 | }
48 |
49 | /**
50 | * Delete a session from storage by a given ID.
51 | *
52 | * @param string $id
53 | * @return void
54 | */
55 | public function delete($id)
56 | {
57 | $this->memcached->forget($id);
58 | }
59 |
60 | }
--------------------------------------------------------------------------------
/laravel/session/drivers/memory.php:
--------------------------------------------------------------------------------
1 | session;
23 | }
24 |
25 | /**
26 | * Save a given session to storage.
27 | *
28 | * @param array $session
29 | * @param array $config
30 | * @param bool $exists
31 | * @return void
32 | */
33 | public function save($session, $config, $exists)
34 | {
35 | //
36 | }
37 |
38 | /**
39 | * Delete a session from storage by a given ID.
40 | *
41 | * @param string $id
42 | * @return void
43 | */
44 | public function delete($id)
45 | {
46 | //
47 | }
48 |
49 | }
--------------------------------------------------------------------------------
/laravel/session/drivers/redis.php:
--------------------------------------------------------------------------------
1 | redis = $redis;
21 | }
22 |
23 | /**
24 | * Load a session from storage by a given ID.
25 | *
26 | * If no session is found for the ID, null will be returned.
27 | *
28 | * @param string $id
29 | * @return array
30 | */
31 | public function load($id)
32 | {
33 | return $this->redis->get($id);
34 | }
35 |
36 | /**
37 | * Save a given session to storage.
38 | *
39 | * @param array $session
40 | * @param array $config
41 | * @param bool $exists
42 | * @return void
43 | */
44 | public function save($session, $config, $exists)
45 | {
46 | $this->redis->put($session['id'], $session, $config['lifetime']);
47 | }
48 |
49 | /**
50 | * Delete a session from storage by a given ID.
51 | *
52 | * @param string $id
53 | * @return void
54 | */
55 | public function delete($id)
56 | {
57 | $this->redis->forget($id);
58 | }
59 |
60 | }
--------------------------------------------------------------------------------
/laravel/session/drivers/sweeper.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Console\Formatter;
13 |
14 | /**
15 | * Formatter style interface for defining styles.
16 | *
17 | * @author Konstantin Kudryashov
18 | *
19 | * @api
20 | */
21 | interface OutputFormatterStyleInterface
22 | {
23 | /**
24 | * Sets style foreground color.
25 | *
26 | * @param string $color color name
27 | *
28 | * @api
29 | */
30 | function setForeground($color = null);
31 |
32 | /**
33 | * Sets style background color.
34 | *
35 | * @param string $color color name
36 | *
37 | * @api
38 | */
39 | function setBackground($color = null);
40 |
41 | /**
42 | * Sets some specific style option.
43 | *
44 | * @param string $option option name
45 | *
46 | * @api
47 | */
48 | function setOption($option);
49 |
50 | /**
51 | * Unsets some specific style option.
52 | *
53 | * @param string $option option name
54 | */
55 | function unsetOption($option);
56 |
57 | /**
58 | * Sets multiple style options at once.
59 | *
60 | * @param array $options
61 | */
62 | function setOptions(array $options);
63 |
64 | /**
65 | * Applies the style to a given text.
66 | *
67 | * @param string $text The text to style
68 | *
69 | * @return string
70 | */
71 | function apply($text);
72 | }
73 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/Console/Helper/Helper.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Console\Helper;
13 |
14 | /**
15 | * Helper is the base class for all helper classes.
16 | *
17 | * @author Fabien Potencier
18 | */
19 | abstract class Helper implements HelperInterface
20 | {
21 | protected $helperSet = null;
22 |
23 | /**
24 | * Sets the helper set associated with this helper.
25 | *
26 | * @param HelperSet $helperSet A HelperSet instance
27 | */
28 | public function setHelperSet(HelperSet $helperSet = null)
29 | {
30 | $this->helperSet = $helperSet;
31 | }
32 |
33 | /**
34 | * Gets the helper set associated with this helper.
35 | *
36 | * @return HelperSet A HelperSet instance
37 | */
38 | public function getHelperSet()
39 | {
40 | return $this->helperSet;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/Console/Helper/HelperInterface.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Console\Helper;
13 |
14 | /**
15 | * HelperInterface is the interface all helpers must implement.
16 | *
17 | * @author Fabien Potencier
18 | *
19 | * @api
20 | */
21 | interface HelperInterface
22 | {
23 | /**
24 | * Sets the helper set associated with this helper.
25 | *
26 | * @param HelperSet $helperSet A HelperSet instance
27 | *
28 | * @api
29 | */
30 | function setHelperSet(HelperSet $helperSet = null);
31 |
32 | /**
33 | * Gets the helper set associated with this helper.
34 | *
35 | * @return HelperSet A HelperSet instance
36 | *
37 | * @api
38 | */
39 | function getHelperSet();
40 |
41 | /**
42 | * Returns the canonical name of this helper.
43 | *
44 | * @return string The canonical name
45 | *
46 | * @api
47 | */
48 | function getName();
49 | }
50 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/Console/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2004-2012 Fabien Potencier
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/Console/Output/ConsoleOutputInterface.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Console\Output;
13 |
14 | use Symfony\Component\Console\Output\OutputInterface;
15 |
16 | /**
17 | * ConsoleOutputInterface is the interface implemented by ConsoleOutput class.
18 | * This adds information about stderr output stream.
19 | *
20 | * @author Dariusz Górecki
21 | */
22 | interface ConsoleOutputInterface extends OutputInterface
23 | {
24 | /**
25 | * @return OutputInterface
26 | */
27 | public function getErrorOutput();
28 |
29 | public function setErrorOutput(OutputInterface $error);
30 | }
31 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/Console/Output/NullOutput.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\Console\Output;
13 |
14 | /**
15 | * NullOutput suppresses all output.
16 | *
17 | * $output = new NullOutput();
18 | *
19 | * @author Fabien Potencier
20 | *
21 | * @api
22 | */
23 | class NullOutput extends Output
24 | {
25 | /**
26 | * Writes a message to the output.
27 | *
28 | * @param string $message A message to write to the output
29 | * @param Boolean $newline Whether to add a newline or not
30 | */
31 | public function doWrite($message, $newline)
32 | {
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/Console/README.md:
--------------------------------------------------------------------------------
1 | Console Component
2 | =================
3 |
4 | Console eases the creation of beautiful and testable command line interfaces.
5 |
6 | The Application object manages the CLI application:
7 |
8 | use Symfony\Component\Console\Application;
9 |
10 | $console = new Application();
11 | $console->run();
12 |
13 | The ``run()`` method parses the arguments and options passed on the command
14 | line and executes the right command.
15 |
16 | Registering a new command can easily be done via the ``register()`` method,
17 | which returns a ``Command`` instance:
18 |
19 | use Symfony\Component\Console\Input\InputInterface;
20 | use Symfony\Component\Console\Input\InputArgument;
21 | use Symfony\Component\Console\Input\InputOption;
22 | use Symfony\Component\Console\Output\OutputInterface;
23 |
24 | $console
25 | ->register('ls')
26 | ->setDefinition(array(
27 | new InputArgument('dir', InputArgument::REQUIRED, 'Directory name'),
28 | ))
29 | ->setDescription('Displays the files in the given directory')
30 | ->setCode(function (InputInterface $input, OutputInterface $output) {
31 | $dir = $input->getArgument('dir');
32 |
33 | $output->writeln(sprintf('Dir listing for %s', $dir));
34 | })
35 | ;
36 |
37 | You can also register new commands via classes.
38 |
39 | The component provides a lot of features like output coloring, input and
40 | output abstractions (so that you can easily unit-test your commands),
41 | validation, automatic help messages, ...
42 |
43 | Resources
44 | ---------
45 |
46 | Unit tests:
47 |
48 | https://github.com/symfony/symfony/tree/master/tests/Symfony/Tests/Component/Console
49 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/Console/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "symfony/console",
3 | "type": "library",
4 | "description": "Symfony Console Component",
5 | "keywords": [],
6 | "homepage": "http://symfony.com",
7 | "license": "MIT",
8 | "authors": [
9 | {
10 | "name": "Fabien Potencier",
11 | "email": "fabien@symfony.com"
12 | },
13 | {
14 | "name": "Symfony Community",
15 | "homepage": "http://symfony.com/contributors"
16 | }
17 | ],
18 | "require": {
19 | "php": ">=5.3.2"
20 | },
21 | "autoload": {
22 | "psr-0": { "Symfony\\Component\\Console": "" }
23 | },
24 | "target-dir": "Symfony/Component/Console",
25 | "extra": {
26 | "branch-alias": {
27 | "dev-master": "2.1-dev"
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/ApacheRequest.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\HttpFoundation;
13 |
14 | /**
15 | * Request represents an HTTP request from an Apache server.
16 | *
17 | * @author Fabien Potencier
18 | */
19 | class ApacheRequest extends Request
20 | {
21 | /**
22 | * {@inheritdoc}
23 | */
24 | protected function prepareRequestUri()
25 | {
26 | return $this->server->get('REQUEST_URI');
27 | }
28 |
29 | /**
30 | * {@inheritdoc}
31 | */
32 | protected function prepareBaseUrl()
33 | {
34 | $baseUrl = $this->server->get('SCRIPT_NAME');
35 |
36 | if (false === strpos($this->server->get('REQUEST_URI'), $baseUrl)) {
37 | // assume mod_rewrite
38 | return rtrim(dirname($baseUrl), '/\\');
39 | }
40 |
41 | return $baseUrl;
42 | }
43 |
44 | /**
45 | * {@inheritdoc}
46 | */
47 | protected function preparePathInfo()
48 | {
49 | return $this->server->get('PATH_INFO') ?: substr($this->prepareRequestUri(), strlen($this->prepareBaseUrl())) ?: '/';
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/File/Exception/AccessDeniedException.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\HttpFoundation\File\Exception;
13 |
14 | /**
15 | * Thrown when the access on a file was denied.
16 | *
17 | * @author Bernhard Schussek
18 | */
19 | class AccessDeniedException extends FileException
20 | {
21 | /**
22 | * Constructor.
23 | *
24 | * @param string $path The path to the accessed file
25 | */
26 | public function __construct($path)
27 | {
28 | parent::__construct(sprintf('The file %s could not be accessed', $path));
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/File/Exception/FileException.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\HttpFoundation\File\Exception;
13 |
14 | /**
15 | * Thrown when an error occurred in the component File
16 | *
17 | * @author Bernhard Schussek
18 | */
19 | class FileException extends \RuntimeException
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/File/Exception/FileNotFoundException.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\HttpFoundation\File\Exception;
13 |
14 | /**
15 | * Thrown when a file was not found
16 | *
17 | * @author Bernhard Schussek
18 | */
19 | class FileNotFoundException extends FileException
20 | {
21 | /**
22 | * Constructor.
23 | *
24 | * @param string $path The path to the file that was not found
25 | */
26 | public function __construct($path)
27 | {
28 | parent::__construct(sprintf('The file "%s" does not exist', $path));
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/File/Exception/UnexpectedTypeException.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\HttpFoundation\File\Exception;
13 |
14 | class UnexpectedTypeException extends FileException
15 | {
16 | public function __construct($value, $expectedType)
17 | {
18 | parent::__construct(sprintf('Expected argument of type %s, %s given', $expectedType, is_object($value) ? get_class($value) : gettype($value)));
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/File/Exception/UploadException.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\HttpFoundation\File\Exception;
13 |
14 | /**
15 | * Thrown when an error occurred during file upload
16 | *
17 | * @author Bernhard Schussek
18 | */
19 | class UploadException extends FileException
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesserInterface.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\HttpFoundation\File\MimeType;
13 |
14 | /**
15 | * Guesses the file extension corresponding to a given mime type
16 | */
17 | interface ExtensionGuesserInterface
18 | {
19 | /**
20 | * Makes a best guess for a file extension, given a mime type
21 | *
22 | * @param string $mimeType The mime type
23 | * @return string The guessed extension or NULL, if none could be guessed
24 | */
25 | function guess($mimeType);
26 | }
27 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\HttpFoundation\File\MimeType;
13 |
14 | use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException;
15 | use Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException;
16 |
17 | /**
18 | * Guesses the mime type using the PECL extension FileInfo
19 | *
20 | * @author Bernhard Schussek
21 | */
22 | class FileinfoMimeTypeGuesser implements MimeTypeGuesserInterface
23 | {
24 | /**
25 | * Returns whether this guesser is supported on the current OS/PHP setup
26 | *
27 | * @return Boolean
28 | */
29 | static public function isSupported()
30 | {
31 | return function_exists('finfo_open');
32 | }
33 |
34 | /**
35 | * Guesses the mime type of the file with the given path
36 | *
37 | * @see MimeTypeGuesserInterface::guess()
38 | */
39 | public function guess($path)
40 | {
41 | if (!is_file($path)) {
42 | throw new FileNotFoundException($path);
43 | }
44 |
45 | if (!is_readable($path)) {
46 | throw new AccessDeniedException($path);
47 | }
48 |
49 | if (!self::isSupported()) {
50 | return null;
51 | }
52 |
53 | if (!$finfo = new \finfo(FILEINFO_MIME_TYPE)) {
54 | return null;
55 | }
56 |
57 | return $finfo->file($path);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\HttpFoundation\File\MimeType;
13 |
14 | /**
15 | * Guesses the mime type of a file
16 | *
17 | * @author Bernhard Schussek
18 | */
19 | interface MimeTypeGuesserInterface
20 | {
21 | /**
22 | * Guesses the mime type of the file with the given path.
23 | *
24 | * @param string $path The path to the file
25 | *
26 | * @return string The mime type or NULL, if none could be guessed
27 | *
28 | * @throws FileNotFoundException If the file does not exist
29 | * @throws AccessDeniedException If the file could not be read
30 | */
31 | function guess($path);
32 | }
33 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/JsonResponse.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\HttpFoundation;
13 |
14 | /**
15 | * Response represents an HTTP response in JSON format.
16 | *
17 | * @author Igor Wiedler
18 | */
19 | class JsonResponse extends Response
20 | {
21 | /**
22 | * Constructor.
23 | *
24 | * @param mixed $data The response data
25 | * @param integer $status The response status code
26 | * @param array $headers An array of response headers
27 | */
28 | public function __construct($data = array(), $status = 200, $headers = array())
29 | {
30 | // root should be JSON object, not array
31 | if (is_array($data) && 0 === count($data)) {
32 | $data = new \ArrayObject();
33 | }
34 |
35 | parent::__construct(
36 | json_encode($data),
37 | $status,
38 | array_merge(array('Content-Type' => 'application/json'), $headers)
39 | );
40 | }
41 |
42 | /**
43 | * {@inheritDoc}
44 | */
45 | static public function create($data = array(), $status = 200, $headers = array())
46 | {
47 | return new static($data, $status, $headers);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2004-2012 Fabien Potencier
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/LaravelRequest.php:
--------------------------------------------------------------------------------
1 | server->get('CONTENT_TYPE'), 'application/x-www-form-urlencoded')
17 | && in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), array('PUT', 'DELETE', 'PATCH'))
18 | ) {
19 | parse_str($request->getContent(), $data);
20 | if (magic_quotes()) $data = array_strip_slashes($data);
21 | $request->request = new ParameterBag($data);
22 | }
23 |
24 | return $request;
25 | }
26 |
27 | /**
28 | * Get the root URL of the application.
29 | *
30 | * @return string
31 | */
32 | public function getRootUrl()
33 | {
34 | return $this->getScheme().'://'.$this->getHttpHost().$this->getBasePath();
35 | }
36 |
37 | }
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/README.md:
--------------------------------------------------------------------------------
1 | HttpFoundation Component
2 | ========================
3 |
4 | HttpFoundation defines an object-oriented layer for the HTTP specification.
5 |
6 | It provides an abstraction for requests, responses, uploaded files, cookies,
7 | sessions, ...
8 |
9 | In this example, we get a Request object from the current PHP global
10 | variables:
11 |
12 | use Symfony\Component\HttpFoundation\Request;
13 | use Symfony\Component\HttpFoundation\Response;
14 |
15 | $request = Request::createFromGlobals();
16 | echo $request->getPathInfo();
17 |
18 | You can also create a Request directly -- that's interesting for unit testing:
19 |
20 | $request = Request::create('/?foo=bar', 'GET');
21 | echo $request->getPathInfo();
22 |
23 | And here is how to create and send a Response:
24 |
25 | $response = new Response('Not Found', 404, array('Content-Type' => 'text/plain'));
26 | $response->send();
27 |
28 | The Request and the Response classes have many other methods that implement
29 | the HTTP specification.
30 |
31 | Loading
32 | -------
33 |
34 | If you are using PHP 5.3.x you must add the following to your autoloader:
35 |
36 | // SessionHandlerInterface
37 | if (!interface_exists('SessionHandlerInterface')) {
38 | $loader->registerPrefixFallback(__DIR__.'/../vendor/symfony/src/Symfony/Component/HttpFoundation/Resources/stubs');
39 | }
40 |
41 |
42 | Resources
43 | ---------
44 |
45 | Unit tests:
46 |
47 | https://github.com/symfony/symfony/tree/master/tests/Symfony/Tests/Component/HttpFoundation
48 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/RequestMatcherInterface.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\HttpFoundation;
13 |
14 | /**
15 | * RequestMatcherInterface is an interface for strategies to match a Request.
16 | *
17 | * @author Fabien Potencier
18 | *
19 | * @api
20 | */
21 | interface RequestMatcherInterface
22 | {
23 | /**
24 | * Decides whether the rule(s) implemented by the strategy matches the supplied request.
25 | *
26 | * @param Request $request The request to check for a match
27 | *
28 | * @return Boolean true if the request matches, false otherwise
29 | *
30 | * @api
31 | */
32 | function matches(Request $request);
33 | }
34 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/ServerBag.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\HttpFoundation;
13 |
14 | /**
15 | * ServerBag is a container for HTTP headers from the $_SERVER variable.
16 | *
17 | * @author Fabien Potencier
18 | * @author Bulat Shakirzyanov
19 | */
20 | class ServerBag extends ParameterBag
21 | {
22 | /**
23 | * Gets the HTTP headers.
24 | *
25 | * @return string
26 | */
27 | public function getHeaders()
28 | {
29 | $headers = array();
30 | foreach ($this->parameters as $key => $value) {
31 | if (0 === strpos($key, 'HTTP_')) {
32 | $headers[substr($key, 5)] = $value;
33 | }
34 | // CONTENT_* are not prefixed with HTTP_
35 | elseif (in_array($key, array('CONTENT_LENGTH', 'CONTENT_MD5', 'CONTENT_TYPE'))) {
36 | $headers[$key] = $this->parameters[$key];
37 | }
38 | }
39 |
40 | // PHP_AUTH_USER/PHP_AUTH_PW
41 | if (isset($this->parameters['PHP_AUTH_USER'])) {
42 | $pass = isset($this->parameters['PHP_AUTH_PW']) ? $this->parameters['PHP_AUTH_PW'] : '';
43 | $headers['AUTHORIZATION'] = 'Basic '.base64_encode($this->parameters['PHP_AUTH_USER'].':'.$pass);
44 | }
45 |
46 | return $headers;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\HttpFoundation\Session\Attribute;
13 |
14 | use Symfony\Component\HttpFoundation\Session\SessionBagInterface;
15 |
16 | /**
17 | * Attributes store.
18 | *
19 | * @author Drak
20 | */
21 | interface AttributeBagInterface extends SessionBagInterface
22 | {
23 | /**
24 | * Checks if an attribute is defined.
25 | *
26 | * @param string $name The attribute name
27 | *
28 | * @return Boolean true if the attribute is defined, false otherwise
29 | */
30 | function has($name);
31 |
32 | /**
33 | * Returns an attribute.
34 | *
35 | * @param string $name The attribute name
36 | * @param mixed $default The default value if not found.
37 | *
38 | * @return mixed
39 | */
40 | function get($name, $default = null);
41 |
42 | /**
43 | * Sets an attribute.
44 | *
45 | * @param string $name
46 | * @param mixed $value
47 | */
48 | function set($name, $value);
49 |
50 | /**
51 | * Returns attributes.
52 | *
53 | * @return array Attributes
54 | */
55 | function all();
56 |
57 | /**
58 | * Sets attributes.
59 | *
60 | * @param array $attributes Attributes
61 | */
62 | function replace(array $attributes);
63 |
64 | /**
65 | * Removes an attribute.
66 | *
67 | * @param string $name
68 | *
69 | * @return mixed The removed value
70 | */
71 | function remove($name);
72 | }
73 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\HttpFoundation\Session;
13 |
14 | /**
15 | * Session Bag store.
16 | *
17 | * @author Drak
18 | */
19 | interface SessionBagInterface
20 | {
21 | /**
22 | * Gets this bag's name
23 | *
24 | * @return string
25 | */
26 | function getName();
27 |
28 | /**
29 | * Initializes the Bag
30 | *
31 | * @param array $array
32 | */
33 | function initialize(array &$array);
34 |
35 | /**
36 | * Gets the storage key for this bag.
37 | *
38 | * @return string
39 | */
40 | function getStorageKey();
41 |
42 | /**
43 | * Clears out data from bag.
44 | *
45 | * @return mixed Whatever data was contained.
46 | */
47 | function clear();
48 | }
49 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;
13 |
14 | /**
15 | * NativeFileSessionHandler.
16 | *
17 | * Native session handler using PHP's built in file storage.
18 | *
19 | * @author Drak
20 | */
21 | class NativeFileSessionHandler extends NativeSessionHandler
22 | {
23 | /**
24 | * Constructor.
25 | *
26 | * @param string $savePath Path of directory to save session files. Default null will leave setting as defined by PHP.
27 | */
28 | public function __construct($savePath = null)
29 | {
30 | if (null === $savePath) {
31 | $savePath = ini_get('session.save_path');
32 | }
33 |
34 | if ($savePath && !is_dir($savePath)) {
35 | mkdir($savePath, 0777, true);
36 | }
37 |
38 | ini_set('session.save_handler', 'files');
39 | ini_set('session.save_path', $savePath);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSessionHandler.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;
13 |
14 | /**
15 | * Adds SessionHandler functionality if available.
16 | *
17 | * @see http://php.net/sessionhandler
18 | */
19 |
20 | if (version_compare(phpversion(), '5.4.0', '>=')) {
21 | class NativeSessionHandler extends \SessionHandler {}
22 | } else {
23 | class NativeSessionHandler {}
24 | }
25 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSqliteSessionHandler.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;
13 |
14 | /**
15 | * NativeSqliteSessionHandler.
16 | *
17 | * Driver for the sqlite session save hadlers provided by the SQLite PHP extension.
18 | *
19 | * @author Drak
20 | */
21 | class NativeSqliteSessionHandler extends NativeSessionHandler
22 | {
23 | /**
24 | * Constructor.
25 | *
26 | * @param string $savePath Path to SQLite database file itself.
27 | * @param array $options Session configuration options.
28 | */
29 | public function __construct($savePath, array $options = array())
30 | {
31 | if (!extension_loaded('sqlite')) {
32 | throw new \RuntimeException('PHP does not have "sqlite" session module registered');
33 | }
34 |
35 | if (null === $savePath) {
36 | $savePath = ini_get('session.save_path');
37 | }
38 |
39 | ini_set('session.save_handler', 'sqlite');
40 | ini_set('session.save_path', $savePath);
41 |
42 | $this->setOptions($options);
43 | }
44 |
45 | /**
46 | * Set any sqlite ini values.
47 | *
48 | * @see http://php.net/sqlite.configuration
49 | */
50 | protected function setOptions(array $options)
51 | {
52 | foreach ($options as $key => $value) {
53 | if (in_array($key, array('sqlite.assoc_case'))) {
54 | ini_set($key, $value);
55 | }
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/Session/Storage/Handler/NullSessionHandler.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;
13 |
14 | /**
15 | * NullSessionHandler.
16 | *
17 | * Can be used in unit testing or in a sitation where persisted sessions are not desired.
18 | *
19 | * @author Drak
20 | *
21 | * @api
22 | */
23 | class NullSessionHandler implements \SessionHandlerInterface
24 | {
25 | /**
26 | * {@inheritdoc}
27 | */
28 | public function open($savePath, $sessionName)
29 | {
30 | return true;
31 | }
32 |
33 | /**
34 | * {@inheritdoc}
35 | */
36 | public function close()
37 | {
38 | return true;
39 | }
40 |
41 | /**
42 | * {@inheritdoc}
43 | */
44 | public function read($sessionId)
45 | {
46 | return '';
47 | }
48 |
49 | /**
50 | * {@inheritdoc}
51 | */
52 | public function write($sessionId, $data)
53 | {
54 | return true;
55 | }
56 |
57 | /**
58 | * {@inheritdoc}
59 | */
60 | public function destroy($sessionId)
61 | {
62 | return true;
63 | }
64 |
65 | /**
66 | * {@inheritdoc}
67 | */
68 | public function gc($lifetime)
69 | {
70 | return true;
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/Session/Storage/Proxy/NativeProxy.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy;
13 |
14 | /**
15 | * NativeProxy.
16 | *
17 | * This proxy is built-in session handlers in PHP 5.3.x
18 | *
19 | * @author Drak
20 | */
21 | class NativeProxy extends AbstractProxy
22 | {
23 | /**
24 | * Constructor.
25 | */
26 | public function __construct()
27 | {
28 | // this makes an educated guess as to what the handler is since it should already be set.
29 | $this->saveHandlerName = ini_get('session.save_handler');
30 | }
31 |
32 | /**
33 | * Returns true if this handler wraps an internal PHP session save handler using \SessionHandler.
34 | *
35 | * @return bool False.
36 | */
37 | public function isWrapper()
38 | {
39 | return false;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/laravel/vendor/Symfony/Component/HttpFoundation/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "symfony/http-foundation",
3 | "type": "library",
4 | "description": "Symfony HttpFoundation Component",
5 | "keywords": [],
6 | "homepage": "http://symfony.com",
7 | "license": "MIT",
8 | "authors": [
9 | {
10 | "name": "Fabien Potencier",
11 | "email": "fabien@symfony.com"
12 | },
13 | {
14 | "name": "Symfony Community",
15 | "homepage": "http://symfony.com/contributors"
16 | }
17 | ],
18 | "require": {
19 | "php": ">=5.3.2"
20 | },
21 | "autoload": {
22 | "psr-0": {
23 | "Symfony\\Component\\HttpFoundation": "",
24 | "SessionHandlerInterface": "Symfony/Component/HttpFoundation/Resources/stubs"
25 | }
26 | },
27 | "target-dir": "Symfony/Component/HttpFoundation",
28 | "extra": {
29 | "branch-alias": {
30 | "dev-master": "2.1-dev"
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/public/.htaccess:
--------------------------------------------------------------------------------
1 |
2 | RewriteEngine on
3 |
4 | RewriteCond %{REQUEST_FILENAME} !-f
5 | RewriteCond %{REQUEST_FILENAME} !-d
6 |
7 | RewriteRule ^(.*)$ index.php/$1 [L]
8 |
--------------------------------------------------------------------------------
/public/bundles/.gitignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/akashprojects/PHP-CMS/caeccf2e221d7d7bb9ac3234d394e30903fa62ac/public/bundles/.gitignore
--------------------------------------------------------------------------------
/public/chosen/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | .project
4 |
--------------------------------------------------------------------------------
/public/chosen/LICENSE.md:
--------------------------------------------------------------------------------
1 | # Chosen, a Select Box Enhancer for jQuery and Protoype
2 | ## by Patrick Filler for [Harvest](http://getharvest.com)
3 |
4 | Available for use under the [MIT License](http://en.wikipedia.org/wiki/MIT_License)
5 |
6 | Copyright (c) 2011 by Harvest
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy
9 | of this software and associated documentation files (the "Software"), to deal
10 | in the Software without restriction, including without limitation the rights
11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | copies of the Software, and to permit persons to whom the Software is
13 | furnished to do so, subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be included in
16 | all copies or substantial portions of the Software.
17 |
18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 | THE SOFTWARE.
--------------------------------------------------------------------------------
/public/chosen/VERSION:
--------------------------------------------------------------------------------
1 | 0.9.8
2 |
--------------------------------------------------------------------------------
/public/chosen/coffee/lib/select-parser.coffee:
--------------------------------------------------------------------------------
1 | class SelectParser
2 |
3 | constructor: ->
4 | @options_index = 0
5 | @parsed = []
6 |
7 | add_node: (child) ->
8 | if child.nodeName is "OPTGROUP"
9 | this.add_group child
10 | else
11 | this.add_option child
12 |
13 | add_group: (group) ->
14 | group_position = @parsed.length
15 | @parsed.push
16 | array_index: group_position
17 | group: true
18 | label: group.label
19 | children: 0
20 | disabled: group.disabled
21 | this.add_option( option, group_position, group.disabled ) for option in group.childNodes
22 |
23 | add_option: (option, group_position, group_disabled) ->
24 | if option.nodeName is "OPTION"
25 | if option.text != ""
26 | if group_position?
27 | @parsed[group_position].children += 1
28 | @parsed.push
29 | array_index: @parsed.length
30 | options_index: @options_index
31 | value: option.value
32 | text: option.text
33 | html: option.innerHTML
34 | selected: option.selected
35 | disabled: if group_disabled is true then group_disabled else option.disabled
36 | group_array_index: group_position
37 | classes: option.className
38 | style: option.style.cssText
39 | else
40 | @parsed.push
41 | array_index: @parsed.length
42 | options_index: @options_index
43 | empty: true
44 | @options_index += 1
45 |
46 | SelectParser.select_to_array = (select) ->
47 | parser = new SelectParser()
48 | parser.add_node( child ) for child in select.childNodes
49 | parser.parsed
50 |
51 | this.SelectParser = SelectParser
52 |
--------------------------------------------------------------------------------
/public/chosen/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "author": "harvest",
3 | "name": "chosen",
4 | "version": "0.9.8",
5 | "description": "Chosen is a JavaScript plugin that makes long, unwieldy select boxes much more user-friendly. It is currently available in both jQuery and Prototype flavors.",
6 | "repository": {
7 | "type": "git",
8 | "url": "https://github.com/harvesthq/chosen"
9 | },
10 | "engines": {
11 | "node": ">=0.4.0"
12 | },
13 | "dependencies": {},
14 | "devDependencies": {
15 | "coffee-script": ">= 1.2",
16 | "uglify-js": ">= 1.2.5"
17 | }
18 | }
--------------------------------------------------------------------------------
/public/chosen/test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
25 |
26 |
27 |
28 |
29 |
32 |
33 |
--------------------------------------------------------------------------------
/public/chosen/test.php:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | Add/Edit articles
6 |
7 |
8 |
9 |
10 |
11 |
12 |
21 |
22 |
23 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
JQuery Page Loading Effect
40 |
41 | This is page loading effect with JQuery 1
42 | This is page loading effect with JQuery 2
43 | This is page loading effect with JQuery 3
44 | This is page loading effect with JQuery 4
45 | This is page loading effect with JQuery 5
46 | This is page loading effect with JQuery 6
47 | This is page loading effect with JQuery 7
48 | This is page loading effect with JQuery 8
49 | This is page loading effect with JQuery 9
50 | This is page loading effect with JQuery 10
51 | This is page loading effect with JQuery 11
52 | This is page loading effect with JQuery 12
53 | This is page loading effect with JQuery 13
54 | This is page loading effect with JQuery 14
55 |