Return-Path: X-Original-To: apmail-airavata-commits-archive@www.apache.org Delivered-To: apmail-airavata-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DD59A1004A for ; Sun, 3 May 2015 12:39:44 +0000 (UTC) Received: (qmail 61041 invoked by uid 500); 3 May 2015 12:39:44 -0000 Delivered-To: apmail-airavata-commits-archive@airavata.apache.org Received: (qmail 60934 invoked by uid 500); 3 May 2015 12:39:44 -0000 Mailing-List: contact commits-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list commits@airavata.apache.org Received: (qmail 58229 invoked by uid 99); 3 May 2015 12:39:42 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 May 2015 12:39:42 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 70E47E0779; Sun, 3 May 2015 12:39:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: smarru@apache.org To: commits@airavata.apache.org Date: Sun, 03 May 2015 12:40:24 -0000 Message-Id: <913bedb072fc4cddad3f7407075d13f8@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [44/51] [partial] airavata-php-gateway git commit: removing vendor files http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Auth/Console/RemindersTableCommand.php ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/RemindersTableCommand.php b/vendor/laravel/framework/src/Illuminate/Auth/Console/RemindersTableCommand.php deleted file mode 100644 index c03801c..0000000 --- a/vendor/laravel/framework/src/Illuminate/Auth/Console/RemindersTableCommand.php +++ /dev/null @@ -1,94 +0,0 @@ -files = $files; - } - - /** - * Execute the console command. - * - * @return void - */ - public function fire() - { - $fullPath = $this->createBaseMigration(); - - $this->files->put($fullPath, $this->getMigrationStub()); - - $this->info('Migration created successfully!'); - - $this->call('dump-autoload'); - } - - /** - * Create a base migration file for the reminders. - * - * @return string - */ - protected function createBaseMigration() - { - $name = 'create_password_reminders_table'; - - $path = $this->laravel['path'].'/database/migrations'; - - return $this->laravel['migration.creator']->create($name, $path); - } - - /** - * Get the contents of the reminder migration stub. - * - * @return string - */ - protected function getMigrationStub() - { - $stub = $this->files->get(__DIR__.'/stubs/reminders.stub'); - - return str_replace('password_reminders', $this->getTable(), $stub); - } - - /** - * Get the password reminder table name. - * - * @return string - */ - protected function getTable() - { - return $this->laravel['config']->get('auth.reminder.table'); - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/controller.stub ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/controller.stub b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/controller.stub deleted file mode 100644 index ac59e48..0000000 --- a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/controller.stub +++ /dev/null @@ -1,75 +0,0 @@ -with('error', Lang::get($response)); - - case Password::REMINDER_SENT: - return Redirect::back()->with('status', Lang::get($response)); - } - } - - /** - * Display the password reset view for the given token. - * - * @param string $token - * @return Response - */ - public function getReset($token = null) - { - if (is_null($token)) App::abort(404); - - return View::make('password.reset')->with('token', $token); - } - - /** - * Handle a POST request to reset a user's password. - * - * @return Response - */ - public function postReset() - { - $credentials = Input::only( - 'email', 'password', 'password_confirmation', 'token' - ); - - $response = Password::reset($credentials, function($user, $password) - { - $user->password = Hash::make($password); - - $user->save(); - }); - - switch ($response) - { - case Password::INVALID_PASSWORD: - case Password::INVALID_TOKEN: - case Password::INVALID_USER: - return Redirect::back()->with('error', Lang::get($response)); - - case Password::PASSWORD_RESET: - return Redirect::to('/'); - } - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/reminders.stub ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/reminders.stub b/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/reminders.stub deleted file mode 100755 index dfbcf83..0000000 --- a/vendor/laravel/framework/src/Illuminate/Auth/Console/stubs/reminders.stub +++ /dev/null @@ -1,33 +0,0 @@ -string('email')->index(); - $table->string('token')->index(); - $table->timestamp('created_at'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('password_reminders'); - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php b/vendor/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php deleted file mode 100755 index 0572924..0000000 --- a/vendor/laravel/framework/src/Illuminate/Auth/DatabaseUserProvider.php +++ /dev/null @@ -1,140 +0,0 @@ -conn = $conn; - $this->table = $table; - $this->hasher = $hasher; - } - - /** - * Retrieve a user by their unique identifier. - * - * @param mixed $identifier - * @return \Illuminate\Auth\UserInterface|null - */ - public function retrieveById($identifier) - { - $user = $this->conn->table($this->table)->find($identifier); - - if ( ! is_null($user)) - { - return new GenericUser((array) $user); - } - } - - /** - * Retrieve a user by by their unique identifier and "remember me" token. - * - * @param mixed $identifier - * @param string $token - * @return \Illuminate\Auth\UserInterface|null - */ - public function retrieveByToken($identifier, $token) - { - $user = $this->conn->table($this->table) - ->where('id', $identifier) - ->where('remember_token', $token) - ->first(); - - if ( ! is_null($user)) - { - return new GenericUser((array) $user); - } - } - - /** - * Update the "remember me" token for the given user in storage. - * - * @param \Illuminate\Auth\UserInterface $user - * @param string $token - * @return void - */ - public function updateRememberToken(UserInterface $user, $token) - { - $this->conn->table($this->table) - ->where('id', $user->getAuthIdentifier()) - ->update(array('remember_token' => $token)); - } - - /** - * Retrieve a user by the given credentials. - * - * @param array $credentials - * @return \Illuminate\Auth\UserInterface|null - */ - public function retrieveByCredentials(array $credentials) - { - // First we will add each credential element to the query as a where clause. - // Then we can execute the query and, if we found a user, return it in a - // generic "user" object that will be utilized by the Guard instances. - $query = $this->conn->table($this->table); - - foreach ($credentials as $key => $value) - { - if ( ! str_contains($key, 'password')) - { - $query->where($key, $value); - } - } - - // Now we are ready to execute the query to see if we have an user matching - // the given credentials. If not, we will just return nulls and indicate - // that there are no matching users for these given credential arrays. - $user = $query->first(); - - if ( ! is_null($user)) - { - return new GenericUser((array) $user); - } - } - - /** - * Validate a user against the given credentials. - * - * @param \Illuminate\Auth\UserInterface $user - * @param array $credentials - * @return bool - */ - public function validateCredentials(UserInterface $user, array $credentials) - { - $plain = $credentials['password']; - - return $this->hasher->check($plain, $user->getAuthPassword()); - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php b/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php deleted file mode 100755 index 7f0fcc5..0000000 --- a/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php +++ /dev/null @@ -1,123 +0,0 @@ -model = $model; - $this->hasher = $hasher; - } - - /** - * Retrieve a user by their unique identifier. - * - * @param mixed $identifier - * @return \Illuminate\Auth\UserInterface|null - */ - public function retrieveById($identifier) - { - return $this->createModel()->newQuery()->find($identifier); - } - - /** - * Retrieve a user by their unique identifier and "remember me" token. - * - * @param mixed $identifier - * @param string $token - * @return \Illuminate\Auth\UserInterface|null - */ - public function retrieveByToken($identifier, $token) - { - $model = $this->createModel(); - - return $model->newQuery() - ->where($model->getKeyName(), $identifier) - ->where($model->getRememberTokenName(), $token) - ->first(); - } - - /** - * Update the "remember me" token for the given user in storage. - * - * @param \Illuminate\Auth\UserInterface $user - * @param string $token - * @return void - */ - public function updateRememberToken(UserInterface $user, $token) - { - $user->setRememberToken($token); - - $user->save(); - } - - /** - * Retrieve a user by the given credentials. - * - * @param array $credentials - * @return \Illuminate\Auth\UserInterface|null - */ - public function retrieveByCredentials(array $credentials) - { - // First we will add each credential element to the query as a where clause. - // Then we can execute the query and, if we found a user, return it in a - // Eloquent User "model" that will be utilized by the Guard instances. - $query = $this->createModel()->newQuery(); - - foreach ($credentials as $key => $value) - { - if ( ! str_contains($key, 'password')) $query->where($key, $value); - } - - return $query->first(); - } - - /** - * Validate a user against the given credentials. - * - * @param \Illuminate\Auth\UserInterface $user - * @param array $credentials - * @return bool - */ - public function validateCredentials(UserInterface $user, array $credentials) - { - $plain = $credentials['password']; - - return $this->hasher->check($plain, $user->getAuthPassword()); - } - - /** - * Create a new instance of the model. - * - * @return \Illuminate\Database\Eloquent\Model - */ - public function createModel() - { - $class = '\\'.ltrim($this->model, '\\'); - - return new $class; - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Auth/GenericUser.php ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Auth/GenericUser.php b/vendor/laravel/framework/src/Illuminate/Auth/GenericUser.php deleted file mode 100755 index 7f1972d..0000000 --- a/vendor/laravel/framework/src/Illuminate/Auth/GenericUser.php +++ /dev/null @@ -1,119 +0,0 @@ -attributes = $attributes; - } - - /** - * Get the unique identifier for the user. - * - * @return mixed - */ - public function getAuthIdentifier() - { - return $this->attributes['id']; - } - - /** - * Get the password for the user. - * - * @return string - */ - public function getAuthPassword() - { - return $this->attributes['password']; - } - - /** - * Get the token value for the "remember me" session. - * - * @return string - */ - public function getRememberToken() - { - return $this->attributes[$this->getRememberTokenName()]; - } - - /** - * Set the token value for the "remember me" session. - * - * @param string $value - * @return void - */ - public function setRememberToken($value) - { - $this->attributes[$this->getRememberTokenName()] = $value; - } - - /** - * Get the column name for the "remember me" token. - * - * @return string - */ - public function getRememberTokenName() - { - return 'remember_token'; - } - - /** - * Dynamically access the user's attributes. - * - * @param string $key - * @return mixed - */ - public function __get($key) - { - return $this->attributes[$key]; - } - - /** - * Dynamically set an attribute on the user. - * - * @param string $key - * @param mixed $value - * @return void - */ - public function __set($key, $value) - { - $this->attributes[$key] = $value; - } - - /** - * Dynamically check if a value is set on the user. - * - * @param string $key - * @return bool - */ - public function __isset($key) - { - return isset($this->attributes[$key]); - } - - /** - * Dynamically unset a value on the user. - * - * @param string $key - * @return void - */ - public function __unset($key) - { - unset($this->attributes[$key]); - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Auth/Guard.php ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Guard.php b/vendor/laravel/framework/src/Illuminate/Auth/Guard.php deleted file mode 100755 index 10f3069..0000000 --- a/vendor/laravel/framework/src/Illuminate/Auth/Guard.php +++ /dev/null @@ -1,752 +0,0 @@ -session = $session; - $this->request = $request; - $this->provider = $provider; - } - - /** - * Determine if the current user is authenticated. - * - * @return bool - */ - public function check() - { - return ! is_null($this->user()); - } - - /** - * Determine if the current user is a guest. - * - * @return bool - */ - public function guest() - { - return ! $this->check(); - } - - /** - * Get the currently authenticated user. - * - * @return \Illuminate\Auth\UserInterface|null - */ - public function user() - { - if ($this->loggedOut) return; - - // If we have already retrieved the user for the current request we can just - // return it back immediately. We do not want to pull the user data every - // request into the method because that would tremendously slow an app. - if ( ! is_null($this->user)) - { - return $this->user; - } - - $id = $this->session->get($this->getName()); - - // First we will try to load the user using the identifier in the session if - // one exists. Otherwise we will check for a "remember me" cookie in this - // request, and if one exists, attempt to retrieve the user using that. - $user = null; - - if ( ! is_null($id)) - { - $user = $this->provider->retrieveByID($id); - } - - // If the user is null, but we decrypt a "recaller" cookie we can attempt to - // pull the user data on that cookie which serves as a remember cookie on - // the application. Once we have a user we can return it to the caller. - $recaller = $this->getRecaller(); - - if (is_null($user) && ! is_null($recaller)) - { - $user = $this->getUserByRecaller($recaller); - } - - return $this->user = $user; - } - - /** - * Get the ID for the currently authenticated user. - * - * @return int|null - */ - public function id() - { - if ($this->loggedOut) return; - - $id = $this->session->get($this->getName(), $this->getRecallerId()); - - if (is_null($id) && $this->user()) - { - $id = $this->user()->getAuthIdentifier(); - } - - return $id; - } - - /** - * Pull a user from the repository by its recaller ID. - * - * @param string $recaller - * @return mixed - */ - protected function getUserByRecaller($recaller) - { - if ($this->validRecaller($recaller) && ! $this->tokenRetrievalAttempted) - { - $this->tokenRetrievalAttempted = true; - - list($id, $token) = explode('|', $recaller, 2); - - $this->viaRemember = ! is_null($user = $this->provider->retrieveByToken($id, $token)); - - return $user; - } - } - - /** - * Get the decrypted recaller cookie for the request. - * - * @return string|null - */ - protected function getRecaller() - { - return $this->request->cookies->get($this->getRecallerName()); - } - - /** - * Get the user ID from the recaller cookie. - * - * @return string - */ - protected function getRecallerId() - { - if ($this->validRecaller($recaller = $this->getRecaller())) - { - return head(explode('|', $recaller)); - } - } - - /** - * Determine if the recaller cookie is in a valid format. - * - * @param string $recaller - * @return bool - */ - protected function validRecaller($recaller) - { - if ( ! is_string($recaller) || ! str_contains($recaller, '|')) return false; - - $segments = explode('|', $recaller); - - return count($segments) == 2 && trim($segments[0]) !== '' && trim($segments[1]) !== ''; - } - - /** - * Log a user into the application without sessions or cookies. - * - * @param array $credentials - * @return bool - */ - public function once(array $credentials = array()) - { - if ($this->validate($credentials)) - { - $this->setUser($this->lastAttempted); - - return true; - } - - return false; - } - - /** - * Validate a user's credentials. - * - * @param array $credentials - * @return bool - */ - public function validate(array $credentials = array()) - { - return $this->attempt($credentials, false, false); - } - - /** - * Attempt to authenticate using HTTP Basic Auth. - * - * @param string $field - * @param \Symfony\Component\HttpFoundation\Request $request - * @return \Symfony\Component\HttpFoundation\Response|null - */ - public function basic($field = 'email', Request $request = null) - { - if ($this->check()) return; - - $request = $request ?: $this->getRequest(); - - // If a username is set on the HTTP basic request, we will return out without - // interrupting the request lifecycle. Otherwise, we'll need to generate a - // request indicating that the given credentials were invalid for login. - if ($this->attemptBasic($request, $field)) return; - - return $this->getBasicResponse(); - } - - /** - * Perform a stateless HTTP Basic login attempt. - * - * @param string $field - * @param \Symfony\Component\HttpFoundation\Request $request - * @return \Symfony\Component\HttpFoundation\Response|null - */ - public function onceBasic($field = 'email', Request $request = null) - { - $request = $request ?: $this->getRequest(); - - if ( ! $this->once($this->getBasicCredentials($request, $field))) - { - return $this->getBasicResponse(); - } - } - - /** - * Attempt to authenticate using basic authentication. - * - * @param \Symfony\Component\HttpFoundation\Request $request - * @param string $field - * @return bool - */ - protected function attemptBasic(Request $request, $field) - { - if ( ! $request->getUser()) return false; - - return $this->attempt($this->getBasicCredentials($request, $field)); - } - - /** - * Get the credential array for a HTTP Basic request. - * - * @param \Symfony\Component\HttpFoundation\Request $request - * @param string $field - * @return array - */ - protected function getBasicCredentials(Request $request, $field) - { - return array($field => $request->getUser(), 'password' => $request->getPassword()); - } - - /** - * Get the response for basic authentication. - * - * @return \Symfony\Component\HttpFoundation\Response - */ - protected function getBasicResponse() - { - $headers = array('WWW-Authenticate' => 'Basic'); - - return new Response('Invalid credentials.', 401, $headers); - } - - /** - * Attempt to authenticate a user using the given credentials. - * - * @param array $credentials - * @param bool $remember - * @param bool $login - * @return bool - */ - public function attempt(array $credentials = array(), $remember = false, $login = true) - { - $this->fireAttemptEvent($credentials, $remember, $login); - - $this->lastAttempted = $user = $this->provider->retrieveByCredentials($credentials); - - // If an implementation of UserInterface was returned, we'll ask the provider - // to validate the user against the given credentials, and if they are in - // fact valid we'll log the users into the application and return true. - if ($this->hasValidCredentials($user, $credentials)) - { - if ($login) $this->login($user, $remember); - - return true; - } - - return false; - } - - /** - * Determine if the user matches the credentials. - * - * @param mixed $user - * @param array $credentials - * @return bool - */ - protected function hasValidCredentials($user, $credentials) - { - return ! is_null($user) && $this->provider->validateCredentials($user, $credentials); - } - - /** - * Fire the attempt event with the arguments. - * - * @param array $credentials - * @param bool $remember - * @param bool $login - * @return void - */ - protected function fireAttemptEvent(array $credentials, $remember, $login) - { - if ($this->events) - { - $payload = array($credentials, $remember, $login); - - $this->events->fire('auth.attempt', $payload); - } - } - - /** - * Register an authentication attempt event listener. - * - * @param mixed $callback - * @return void - */ - public function attempting($callback) - { - if ($this->events) - { - $this->events->listen('auth.attempt', $callback); - } - } - - /** - * Log a user into the application. - * - * @param \Illuminate\Auth\UserInterface $user - * @param bool $remember - * @return void - */ - public function login(UserInterface $user, $remember = false) - { - $this->updateSession($user->getAuthIdentifier()); - - // If the user should be permanently "remembered" by the application we will - // queue a permanent cookie that contains the encrypted copy of the user - // identifier. We will then decrypt this later to retrieve the users. - if ($remember) - { - $this->createRememberTokenIfDoesntExist($user); - - $this->queueRecallerCookie($user); - } - - // If we have an event dispatcher instance set we will fire an event so that - // any listeners will hook into the authentication events and run actions - // based on the login and logout events fired from the guard instances. - if (isset($this->events)) - { - $this->events->fire('auth.login', array($user, $remember)); - } - - $this->setUser($user); - } - - /** - * Update the session with the given ID. - * - * @param string $id - * @return void - */ - protected function updateSession($id) - { - $this->session->put($this->getName(), $id); - - $this->session->migrate(true); - } - - /** - * Log the given user ID into the application. - * - * @param mixed $id - * @param bool $remember - * @return \Illuminate\Auth\UserInterface - */ - public function loginUsingId($id, $remember = false) - { - $this->session->put($this->getName(), $id); - - $this->login($user = $this->provider->retrieveById($id), $remember); - - return $user; - } - - /** - * Log the given user ID into the application without sessions or cookies. - * - * @param mixed $id - * @return bool - */ - public function onceUsingId($id) - { - $this->setUser($this->provider->retrieveById($id)); - - return $this->user instanceof UserInterface; - } - - /** - * Queue the recaller cookie into the cookie jar. - * - * @param \Illuminate\Auth\UserInterface $user - * @return void - */ - protected function queueRecallerCookie(UserInterface $user) - { - $value = $user->getAuthIdentifier().'|'.$user->getRememberToken(); - - $this->getCookieJar()->queue($this->createRecaller($value)); - } - - /** - * Create a remember me cookie for a given ID. - * - * @param string $value - * @return \Symfony\Component\HttpFoundation\Cookie - */ - protected function createRecaller($value) - { - return $this->getCookieJar()->forever($this->getRecallerName(), $value); - } - - /** - * Log the user out of the application. - * - * @return void - */ - public function logout() - { - $user = $this->user(); - - // If we have an event dispatcher instance, we can fire off the logout event - // so any further processing can be done. This allows the developer to be - // listening for anytime a user signs out of this application manually. - $this->clearUserDataFromStorage(); - - if ( ! is_null($this->user)) - { - $this->refreshRememberToken($user); - } - - if (isset($this->events)) - { - $this->events->fire('auth.logout', array($user)); - } - - // Once we have fired the logout event we will clear the users out of memory - // so they are no longer available as the user is no longer considered as - // being signed into this application and should not be available here. - $this->user = null; - - $this->loggedOut = true; - } - - /** - * Remove the user data from the session and cookies. - * - * @return void - */ - protected function clearUserDataFromStorage() - { - $this->session->forget($this->getName()); - - $recaller = $this->getRecallerName(); - - $this->getCookieJar()->queue($this->getCookieJar()->forget($recaller)); - } - - /** - * Refresh the remember token for the user. - * - * @param \Illuminate\Auth\UserInterface $user - * @return void - */ - protected function refreshRememberToken(UserInterface $user) - { - $user->setRememberToken($token = str_random(60)); - - $this->provider->updateRememberToken($user, $token); - } - - /** - * Create a new remember token for the user if one doesn't already exist. - * - * @param \Illuminate\Auth\UserInterface $user - * @return void - */ - protected function createRememberTokenIfDoesntExist(UserInterface $user) - { - $rememberToken = $user->getRememberToken(); - - if (empty($rememberToken)) - { - $this->refreshRememberToken($user); - } - } - - /** - * Get the cookie creator instance used by the guard. - * - * @return \Illuminate\Cookie\CookieJar - * - * @throws \RuntimeException - */ - public function getCookieJar() - { - if ( ! isset($this->cookie)) - { - throw new \RuntimeException("Cookie jar has not been set."); - } - - return $this->cookie; - } - - /** - * Set the cookie creator instance used by the guard. - * - * @param \Illuminate\Cookie\CookieJar $cookie - * @return void - */ - public function setCookieJar(CookieJar $cookie) - { - $this->cookie = $cookie; - } - - /** - * Get the event dispatcher instance. - * - * @return \Illuminate\Events\Dispatcher - */ - public function getDispatcher() - { - return $this->events; - } - - /** - * Set the event dispatcher instance. - * - * @param \Illuminate\Events\Dispatcher - * @return void - */ - public function setDispatcher(Dispatcher $events) - { - $this->events = $events; - } - - /** - * Get the session store used by the guard. - * - * @return \Illuminate\Session\Store - */ - public function getSession() - { - return $this->session; - } - - /** - * Get the user provider used by the guard. - * - * @return \Illuminate\Auth\UserProviderInterface - */ - public function getProvider() - { - return $this->provider; - } - - /** - * Set the user provider used by the guard. - * - * @param \Illuminate\Auth\UserProviderInterface $provider - * @return void - */ - public function setProvider(UserProviderInterface $provider) - { - $this->provider = $provider; - } - - /** - * Return the currently cached user of the application. - * - * @return \Illuminate\Auth\UserInterface|null - */ - public function getUser() - { - return $this->user; - } - - /** - * Set the current user of the application. - * - * @param \Illuminate\Auth\UserInterface $user - * @return void - */ - public function setUser(UserInterface $user) - { - $this->user = $user; - - $this->loggedOut = false; - } - - /** - * Get the current request instance. - * - * @return \Symfony\Component\HttpFoundation\Request - */ - public function getRequest() - { - return $this->request ?: Request::createFromGlobals(); - } - - /** - * Set the current request instance. - * - * @param \Symfony\Component\HttpFoundation\Request - * @return $this - */ - public function setRequest(Request $request) - { - $this->request = $request; - - return $this; - } - - /** - * Get the last user we attempted to authenticate. - * - * @return \Illuminate\Auth\UserInterface - */ - public function getLastAttempted() - { - return $this->lastAttempted; - } - - /** - * Get a unique identifier for the auth session value. - * - * @return string - */ - public function getName() - { - return 'login_'.md5(get_class($this)); - } - - /** - * Get the name of the cookie used to store the "recaller". - * - * @return string - */ - public function getRecallerName() - { - return 'remember_'.md5(get_class($this)); - } - - /** - * Determine if the user was authenticated via "remember me" cookie. - * - * @return bool - */ - public function viaRemember() - { - return $this->viaRemember; - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Auth/Reminders/DatabaseReminderRepository.php ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Reminders/DatabaseReminderRepository.php b/vendor/laravel/framework/src/Illuminate/Auth/Reminders/DatabaseReminderRepository.php deleted file mode 100755 index dd1f5f1..0000000 --- a/vendor/laravel/framework/src/Illuminate/Auth/Reminders/DatabaseReminderRepository.php +++ /dev/null @@ -1,195 +0,0 @@ -table = $table; - $this->hashKey = $hashKey; - $this->expires = $expires * 60; - $this->connection = $connection; - } - - /** - * Create a new reminder record and token. - * - * @param \Illuminate\Auth\Reminders\RemindableInterface $user - * @return string - */ - public function create(RemindableInterface $user) - { - $email = $user->getReminderEmail(); - - $this->deleteExisting($user); - - // We will create a new, random token for the user so that we can e-mail them - // a safe link to the password reset form. Then we will insert a record in - // the database so that we can verify the token within the actual reset. - $token = $this->createNewToken($user); - - $this->getTable()->insert($this->getPayload($email, $token)); - - return $token; - } - - /** - * Delete all existing reset tokens from the database. - * - * @param \Illuminate\Auth\Reminders\RemindableInterface $user - * @return int - */ - protected function deleteExisting(RemindableInterface $user) - { - return $this->getTable()->where('email', $user->getReminderEmail())->delete(); - } - - /** - * Build the record payload for the table. - * - * @param string $email - * @param string $token - * @return array - */ - protected function getPayload($email, $token) - { - return array('email' => $email, 'token' => $token, 'created_at' => new Carbon); - } - - /** - * Determine if a reminder record exists and is valid. - * - * @param \Illuminate\Auth\Reminders\RemindableInterface $user - * @param string $token - * @return bool - */ - public function exists(RemindableInterface $user, $token) - { - $email = $user->getReminderEmail(); - - $reminder = (array) $this->getTable()->where('email', $email)->where('token', $token)->first(); - - return $reminder && ! $this->reminderExpired($reminder); - } - - /** - * Determine if the reminder has expired. - * - * @param array $reminder - * @return bool - */ - protected function reminderExpired($reminder) - { - $createdPlusHour = strtotime($reminder['created_at']) + $this->expires; - - return $createdPlusHour < $this->getCurrentTime(); - } - - /** - * Get the current UNIX timestamp. - * - * @return int - */ - protected function getCurrentTime() - { - return time(); - } - - /** - * Delete a reminder record by token. - * - * @param string $token - * @return void - */ - public function delete($token) - { - $this->getTable()->where('token', $token)->delete(); - } - - /** - * Delete expired reminders. - * - * @return void - */ - public function deleteExpired() - { - $expired = Carbon::now()->subSeconds($this->expires); - - $this->getTable()->where('created_at', '<', $expired)->delete(); - } - - /** - * Create a new token for the user. - * - * @param \Illuminate\Auth\Reminders\RemindableInterface $user - * @return string - */ - public function createNewToken(RemindableInterface $user) - { - $email = $user->getReminderEmail(); - - $value = str_shuffle(sha1($email.spl_object_hash($this).microtime(true))); - - return hash_hmac('sha1', $value, $this->hashKey); - } - - /** - * Begin a new database query against the table. - * - * @return \Illuminate\Database\Query\Builder - */ - protected function getTable() - { - return $this->connection->table($this->table); - } - - /** - * Get the database connection instance. - * - * @return \Illuminate\Database\Connection - */ - public function getConnection() - { - return $this->connection; - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Auth/Reminders/PasswordBroker.php ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Reminders/PasswordBroker.php b/vendor/laravel/framework/src/Illuminate/Auth/Reminders/PasswordBroker.php deleted file mode 100755 index c285c87..0000000 --- a/vendor/laravel/framework/src/Illuminate/Auth/Reminders/PasswordBroker.php +++ /dev/null @@ -1,282 +0,0 @@ -users = $users; - $this->mailer = $mailer; - $this->reminders = $reminders; - $this->reminderView = $reminderView; - } - - /** - * Send a password reminder to a user. - * - * @param array $credentials - * @param \Closure $callback - * @return string - */ - public function remind(array $credentials, Closure $callback = null) - { - // First we will check to see if we found a user at the given credentials and - // if we did not we will redirect back to this current URI with a piece of - // "flash" data in the session to indicate to the developers the errors. - $user = $this->getUser($credentials); - - if (is_null($user)) - { - return self::INVALID_USER; - } - - // Once we have the reminder token, we are ready to send a message out to the - // user with a link to reset their password. We will then redirect back to - // the current URI having nothing set in the session to indicate errors. - $token = $this->reminders->create($user); - - $this->sendReminder($user, $token, $callback); - - return self::REMINDER_SENT; - } - - /** - * Send the password reminder e-mail. - * - * @param \Illuminate\Auth\Reminders\RemindableInterface $user - * @param string $token - * @param \Closure $callback - * @return int - */ - public function sendReminder(RemindableInterface $user, $token, Closure $callback = null) - { - // We will use the reminder view that was given to the broker to display the - // password reminder e-mail. We'll pass a "token" variable into the views - // so that it may be displayed for an user to click for password reset. - $view = $this->reminderView; - - return $this->mailer->send($view, compact('token', 'user'), function($m) use ($user, $token, $callback) - { - $m->to($user->getReminderEmail()); - - if ( ! is_null($callback)) call_user_func($callback, $m, $user, $token); - }); - } - - /** - * Reset the password for the given token. - * - * @param array $credentials - * @param \Closure $callback - * @return mixed - */ - public function reset(array $credentials, Closure $callback) - { - // If the responses from the validate method is not a user instance, we will - // assume that it is a redirect and simply return it from this method and - // the user is properly redirected having an error message on the post. - $user = $this->validateReset($credentials); - - if ( ! $user instanceof RemindableInterface) - { - return $user; - } - - $pass = $credentials['password']; - - // Once we have called this callback, we will remove this token row from the - // table and return the response from this callback so the user gets sent - // to the destination given by the developers from the callback return. - call_user_func($callback, $user, $pass); - - $this->reminders->delete($credentials['token']); - - return self::PASSWORD_RESET; - } - - /** - * Validate a password reset for the given credentials. - * - * @param array $credentials - * @return \Illuminate\Auth\Reminders\RemindableInterface - */ - protected function validateReset(array $credentials) - { - if (is_null($user = $this->getUser($credentials))) - { - return self::INVALID_USER; - } - - if ( ! $this->validNewPasswords($credentials)) - { - return self::INVALID_PASSWORD; - } - - if ( ! $this->reminders->exists($user, $credentials['token'])) - { - return self::INVALID_TOKEN; - } - - return $user; - } - - /** - * Set a custom password validator. - * - * @param \Closure $callback - * @return void - */ - public function validator(Closure $callback) - { - $this->passwordValidator = $callback; - } - - /** - * Determine if the passwords match for the request. - * - * @param array $credentials - * @return bool - */ - protected function validNewPasswords(array $credentials) - { - list($password, $confirm) = array($credentials['password'], $credentials['password_confirmation']); - - if (isset($this->passwordValidator)) - { - return call_user_func($this->passwordValidator, $credentials) && $password === $confirm; - } - - return $this->validatePasswordWithDefaults($credentials); - } - - /** - * Determine if the passwords are valid for the request. - * - * @param array $credentials - * @return bool - */ - protected function validatePasswordWithDefaults(array $credentials) - { - list($password, $confirm) = [$credentials['password'], $credentials['password_confirmation']]; - - return $password === $confirm && mb_strlen($password) >= 6; - } - - /** - * Get the user for the given credentials. - * - * @param array $credentials - * @return \Illuminate\Auth\Reminders\RemindableInterface - * - * @throws \UnexpectedValueException - */ - public function getUser(array $credentials) - { - $credentials = array_except($credentials, array('token')); - - $user = $this->users->retrieveByCredentials($credentials); - - if ($user && ! $user instanceof RemindableInterface) - { - throw new \UnexpectedValueException("User must implement Remindable interface."); - } - - return $user; - } - - /** - * Get the password reminder repository implementation. - * - * @return \Illuminate\Auth\Reminders\ReminderRepositoryInterface - */ - protected function getRepository() - { - return $this->reminders; - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Auth/Reminders/RemindableInterface.php ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Reminders/RemindableInterface.php b/vendor/laravel/framework/src/Illuminate/Auth/Reminders/RemindableInterface.php deleted file mode 100755 index 645fa87..0000000 --- a/vendor/laravel/framework/src/Illuminate/Auth/Reminders/RemindableInterface.php +++ /dev/null @@ -1,12 +0,0 @@ -email; - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Auth/Reminders/ReminderRepositoryInterface.php ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Auth/Reminders/ReminderRepositoryInterface.php b/vendor/laravel/framework/src/Illuminate/Auth/Reminders/ReminderRepositoryInterface.php deleted file mode 100755 index 18c91d0..0000000 --- a/vendor/laravel/framework/src/Illuminate/Auth/Reminders/ReminderRepositoryInterface.php +++ /dev/null @@ -1,37 +0,0 @@ -registerPasswordBroker(); - - $this->registerReminderRepository(); - - $this->registerCommands(); - } - - /** - * Register the password broker instance. - * - * @return void - */ - protected function registerPasswordBroker() - { - $this->app->bindShared('auth.reminder', function($app) - { - // The reminder repository is responsible for storing the user e-mail addresses - // and password reset tokens. It will be used to verify the tokens are valid - // for the given e-mail addresses. We will resolve an implementation here. - $reminders = $app['auth.reminder.repository']; - - $users = $app['auth']->driver()->getProvider(); - - $view = $app['config']['auth.reminder.email']; - - // The password broker uses the reminder repository to validate tokens and send - // reminder e-mails, as well as validating that password reset process as an - // aggregate service of sorts providing a convenient interface for resets. - return new PasswordBroker( - - $reminders, $users, $app['mailer'], $view - - ); - }); - } - - /** - * Register the reminder repository implementation. - * - * @return void - */ - protected function registerReminderRepository() - { - $this->app->bindShared('auth.reminder.repository', function($app) - { - $connection = $app['db']->connection(); - - // The database reminder repository is an implementation of the reminder repo - // interface, and is responsible for the actual storing of auth tokens and - // their e-mail addresses. We will inject this table and hash key to it. - $table = $app['config']['auth.reminder.table']; - - $key = $app['config']['app.key']; - - $expire = $app['config']->get('auth.reminder.expire', 60); - - return new DbRepository($connection, $table, $key, $expire); - }); - } - - /** - * Register the auth related console commands. - * - * @return void - */ - protected function registerCommands() - { - $this->app->bindShared('command.auth.reminders', function($app) - { - return new RemindersTableCommand($app['files']); - }); - - $this->app->bindShared('command.auth.reminders.clear', function() - { - return new ClearRemindersCommand; - }); - - $this->app->bindShared('command.auth.reminders.controller', function($app) - { - return new RemindersControllerCommand($app['files']); - }); - - $this->commands( - 'command.auth.reminders', 'command.auth.reminders.clear', 'command.auth.reminders.controller' - ); - } - - /** - * Get the services provided by the provider. - * - * @return array - */ - public function provides() - { - return array('auth.reminder', 'auth.reminder.repository', 'command.auth.reminders'); - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Auth/UserInterface.php ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Auth/UserInterface.php b/vendor/laravel/framework/src/Illuminate/Auth/UserInterface.php deleted file mode 100755 index b2740a6..0000000 --- a/vendor/laravel/framework/src/Illuminate/Auth/UserInterface.php +++ /dev/null @@ -1,41 +0,0 @@ -getKey(); - } - - /** - * Get the password for the user. - * - * @return string - */ - public function getAuthPassword() - { - return $this->password; - } - - /** - * Get the token value for the "remember me" session. - * - * @return string - */ - public function getRememberToken() - { - return $this->{$this->getRememberTokenName()}; - } - - /** - * Set the token value for the "remember me" session. - * - * @param string $value - * @return void - */ - public function setRememberToken($value) - { - $this->{$this->getRememberTokenName()} = $value; - } - - /** - * Get the column name for the "remember me" token. - * - * @return string - */ - public function getRememberTokenName() - { - return 'remember_token'; - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Auth/composer.json ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Auth/composer.json b/vendor/laravel/framework/src/Illuminate/Auth/composer.json deleted file mode 100755 index 668ccf6..0000000 --- a/vendor/laravel/framework/src/Illuminate/Auth/composer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "illuminate/auth", - "license": "MIT", - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "require": { - "php": ">=5.4.0", - "illuminate/cookie": "4.2.*", - "illuminate/encryption": "4.2.*", - "illuminate/events": "4.2.*", - "illuminate/hashing": "4.2.*", - "illuminate/http": "4.2.*", - "illuminate/session": "4.2.*", - "illuminate/support": "4.2.*", - "nesbot/carbon": "~1.0" - }, - "require-dev": { - "illuminate/console": "4.2.*", - "illuminate/routing": "4.2.*" - }, - "autoload": { - "psr-0": {"Illuminate\\Auth": ""} - }, - "target-dir": "Illuminate/Auth", - "extra": { - "branch-alias": { - "dev-master": "4.2-dev" - } - }, - "minimum-stability": "dev" -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php b/vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php deleted file mode 100755 index 7d5c37a..0000000 --- a/vendor/laravel/framework/src/Illuminate/Cache/ApcStore.php +++ /dev/null @@ -1,128 +0,0 @@ -apc = $apc; - $this->prefix = $prefix; - } - - /** - * Retrieve an item from the cache by key. - * - * @param string $key - * @return mixed - */ - public function get($key) - { - $value = $this->apc->get($this->prefix.$key); - - if ($value !== false) - { - return $value; - } - } - - /** - * Store an item in the cache for a given number of minutes. - * - * @param string $key - * @param mixed $value - * @param int $minutes - * @return void - */ - public function put($key, $value, $minutes) - { - $this->apc->put($this->prefix.$key, $value, $minutes * 60); - } - - /** - * Increment the value of an item in the cache. - * - * @param string $key - * @param mixed $value - * @return int|bool - */ - public function increment($key, $value = 1) - { - return $this->apc->increment($this->prefix.$key, $value); - } - - /** - * Decrement the value of an item in the cache. - * - * @param string $key - * @param mixed $value - * @return int|bool - */ - public function decrement($key, $value = 1) - { - return $this->apc->decrement($this->prefix.$key, $value); - } - - /** - * Store an item in the cache indefinitely. - * - * @param string $key - * @param mixed $value - * @return array|bool - */ - public function forever($key, $value) - { - return $this->put($key, $value, 0); - } - - /** - * Remove an item from the cache. - * - * @param string $key - * @return void - */ - public function forget($key) - { - $this->apc->delete($this->prefix.$key); - } - - /** - * Remove all items from the cache. - * - * @return void - */ - public function flush() - { - $this->apc->flush(); - } - - /** - * Get the cache key prefix. - * - * @return string - */ - public function getPrefix() - { - return $this->prefix; - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Cache/ApcWrapper.php ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Cache/ApcWrapper.php b/vendor/laravel/framework/src/Illuminate/Cache/ApcWrapper.php deleted file mode 100755 index 9172ba8..0000000 --- a/vendor/laravel/framework/src/Illuminate/Cache/ApcWrapper.php +++ /dev/null @@ -1,91 +0,0 @@ -apcu = function_exists('apcu_fetch'); - } - - /** - * Get an item from the cache. - * - * @param string $key - * @return mixed - */ - public function get($key) - { - return $this->apcu ? apcu_fetch($key) : apc_fetch($key); - } - - /** - * Store an item in the cache. - * - * @param string $key - * @param mixed $value - * @param int $seconds - * @return array|bool - */ - public function put($key, $value, $seconds) - { - return $this->apcu ? apcu_store($key, $value, $seconds) : apc_store($key, $value, $seconds); - } - - /** - * Increment the value of an item in the cache. - * - * @param string $key - * @param mixed $value - * @return int|bool - */ - public function increment($key, $value) - { - return $this->apcu ? apcu_inc($key, $value) : apc_inc($key, $value); - } - - /** - * Decrement the value of an item in the cache. - * - * @param string $key - * @param mixed $value - * @return int|bool - */ - public function decrement($key, $value) - { - return $this->apcu ? apcu_dec($key, $value) : apc_dec($key, $value); - } - - /** - * Remove an item from the cache. - * - * @param string $key - * @return array|bool - */ - public function delete($key) - { - return $this->apcu ? apcu_delete($key) : apc_delete($key); - } - - /** - * Remove all items from the cache. - * - * @return void - */ - public function flush() - { - $this->apcu ? apcu_clear_cache() : apc_clear_cache('user'); - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Cache/ArrayStore.php ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Cache/ArrayStore.php b/vendor/laravel/framework/src/Illuminate/Cache/ArrayStore.php deleted file mode 100755 index 65e82e6..0000000 --- a/vendor/laravel/framework/src/Illuminate/Cache/ArrayStore.php +++ /dev/null @@ -1,108 +0,0 @@ -storage)) - { - return $this->storage[$key]; - } - } - - /** - * Store an item in the cache for a given number of minutes. - * - * @param string $key - * @param mixed $value - * @param int $minutes - * @return void - */ - public function put($key, $value, $minutes) - { - $this->storage[$key] = $value; - } - - /** - * Increment the value of an item in the cache. - * - * @param string $key - * @param mixed $value - * @return int - */ - public function increment($key, $value = 1) - { - $this->storage[$key] = $this->storage[$key] + $value; - - return $this->storage[$key]; - } - - /** - * Increment the value of an item in the cache. - * - * @param string $key - * @param mixed $value - * @return int - */ - public function decrement($key, $value = 1) - { - return $this->increment($key, $value * -1); - } - - /** - * Store an item in the cache indefinitely. - * - * @param string $key - * @param mixed $value - * @return void - */ - public function forever($key, $value) - { - return $this->put($key, $value, 0); - } - - /** - * Remove an item from the cache. - * - * @param string $key - * @return void - */ - public function forget($key) - { - unset($this->storage[$key]); - } - - /** - * Remove all items from the cache. - * - * @return void - */ - public function flush() - { - $this->storage = array(); - } - - /** - * Get the cache key prefix. - * - * @return string - */ - public function getPrefix() - { - return ''; - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php b/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php deleted file mode 100755 index 5ec7526..0000000 --- a/vendor/laravel/framework/src/Illuminate/Cache/CacheManager.php +++ /dev/null @@ -1,182 +0,0 @@ -repository(new ApcStore(new ApcWrapper, $this->getPrefix())); - } - - /** - * Create an instance of the array cache driver. - * - * @return \Illuminate\Cache\ArrayStore - */ - protected function createArrayDriver() - { - return $this->repository(new ArrayStore); - } - - /** - * Create an instance of the file cache driver. - * - * @return \Illuminate\Cache\FileStore - */ - protected function createFileDriver() - { - $path = $this->app['config']['cache.path']; - - return $this->repository(new FileStore($this->app['files'], $path)); - } - - /** - * Create an instance of the Memcached cache driver. - * - * @return \Illuminate\Cache\MemcachedStore - */ - protected function createMemcachedDriver() - { - $servers = $this->app['config']['cache.memcached']; - - $memcached = $this->app['memcached.connector']->connect($servers); - - return $this->repository(new MemcachedStore($memcached, $this->getPrefix())); - } - - /** - * Create an instance of the Null cache driver. - * - * @return \Illuminate\Cache\NullStore - */ - protected function createNullDriver() - { - return $this->repository(new NullStore); - } - - /** - * Create an instance of the WinCache cache driver. - * - * @return \Illuminate\Cache\WinCacheStore - */ - protected function createWincacheDriver() - { - return $this->repository(new WinCacheStore($this->getPrefix())); - } - - /** - * Create an instance of the XCache cache driver. - * - * @return \Illuminate\Cache\WinCacheStore - */ - protected function createXcacheDriver() - { - return $this->repository(new XCacheStore($this->getPrefix())); - } - - /** - * Create an instance of the Redis cache driver. - * - * @return \Illuminate\Cache\RedisStore - */ - protected function createRedisDriver() - { - $redis = $this->app['redis']; - - return $this->repository(new RedisStore($redis, $this->getPrefix())); - } - - /** - * Create an instance of the database cache driver. - * - * @return \Illuminate\Cache\DatabaseStore - */ - protected function createDatabaseDriver() - { - $connection = $this->getDatabaseConnection(); - - $encrypter = $this->app['encrypter']; - - // We allow the developer to specify which connection and table should be used - // to store the cached items. We also need to grab a prefix in case a table - // is being used by multiple applications although this is very unlikely. - $table = $this->app['config']['cache.table']; - - $prefix = $this->getPrefix(); - - return $this->repository(new DatabaseStore($connection, $encrypter, $table, $prefix)); - } - - /** - * Get the database connection for the database driver. - * - * @return \Illuminate\Database\Connection - */ - protected function getDatabaseConnection() - { - $connection = $this->app['config']['cache.connection']; - - return $this->app['db']->connection($connection); - } - - /** - * Get the cache "prefix" value. - * - * @return string - */ - public function getPrefix() - { - return $this->app['config']['cache.prefix']; - } - - /** - * Set the cache "prefix" value. - * - * @param string $name - * @return void - */ - public function setPrefix($name) - { - $this->app['config']['cache.prefix'] = $name; - } - - /** - * Create a new cache repository with the given implementation. - * - * @param \Illuminate\Cache\StoreInterface $store - * @return \Illuminate\Cache\Repository - */ - protected function repository(StoreInterface $store) - { - return new Repository($store); - } - - /** - * Get the default cache driver name. - * - * @return string - */ - public function getDefaultDriver() - { - return $this->app['config']['cache.driver']; - } - - /** - * Set the default cache driver name. - * - * @param string $name - * @return void - */ - public function setDefaultDriver($name) - { - $this->app['config']['cache.driver'] = $name; - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php b/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php deleted file mode 100755 index 4dee848..0000000 --- a/vendor/laravel/framework/src/Illuminate/Cache/CacheServiceProvider.php +++ /dev/null @@ -1,71 +0,0 @@ -app->bindShared('cache', function($app) - { - return new CacheManager($app); - }); - - $this->app->bindShared('cache.store', function($app) - { - return $app['cache']->driver(); - }); - - $this->app->bindShared('memcached.connector', function() - { - return new MemcachedConnector; - }); - - $this->registerCommands(); - } - - /** - * Register the cache related console commands. - * - * @return void - */ - public function registerCommands() - { - $this->app->bindShared('command.cache.clear', function($app) - { - return new Console\ClearCommand($app['cache'], $app['files']); - }); - - $this->app->bindShared('command.cache.table', function($app) - { - return new Console\CacheTableCommand($app['files']); - }); - - $this->commands('command.cache.clear', 'command.cache.table'); - } - - /** - * Get the services provided by the provider. - * - * @return array - */ - public function provides() - { - return [ - 'cache', 'cache.store', 'memcached.connector', 'command.cache.clear', 'command.cache.table' - ]; - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Cache/Console/CacheTableCommand.php ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/CacheTableCommand.php b/vendor/laravel/framework/src/Illuminate/Cache/Console/CacheTableCommand.php deleted file mode 100644 index 30daba8..0000000 --- a/vendor/laravel/framework/src/Illuminate/Cache/Console/CacheTableCommand.php +++ /dev/null @@ -1,72 +0,0 @@ -files = $files; - } - - /** - * Execute the console command. - * - * @return void - */ - public function fire() - { - $fullPath = $this->createBaseMigration(); - - $this->files->put($fullPath, $this->files->get(__DIR__.'/stubs/cache.stub')); - - $this->info('Migration created successfully!'); - - $this->call('dump-autoload'); - } - - /** - * Create a base migration file for the table. - * - * @return string - */ - protected function createBaseMigration() - { - $name = 'create_cache_table'; - - $path = $this->laravel['path'].'/database/migrations'; - - return $this->laravel['migration.creator']->create($name, $path); - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php b/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php deleted file mode 100755 index 9f1de3a..0000000 --- a/vendor/laravel/framework/src/Illuminate/Cache/Console/ClearCommand.php +++ /dev/null @@ -1,70 +0,0 @@ -cache = $cache; - $this->files = $files; - } - - /** - * Execute the console command. - * - * @return void - */ - public function fire() - { - $this->laravel['events']->fire('cache:clearing'); - - $this->cache->flush(); - - $this->files->delete($this->laravel['config']['app.manifest'].'/services.json'); - - $this->laravel['events']->fire('cache:cleared'); - - $this->info('Application cache cleared!'); - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Cache/Console/stubs/cache.stub ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Cache/Console/stubs/cache.stub b/vendor/laravel/framework/src/Illuminate/Cache/Console/stubs/cache.stub deleted file mode 100644 index 8ba4467..0000000 --- a/vendor/laravel/framework/src/Illuminate/Cache/Console/stubs/cache.stub +++ /dev/null @@ -1,33 +0,0 @@ -string('key')->unique(); - $table->text('value'); - $table->integer('expiration'); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::drop('cache'); - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php b/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php deleted file mode 100755 index bc2323f..0000000 --- a/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php +++ /dev/null @@ -1,223 +0,0 @@ -table = $table; - $this->prefix = $prefix; - $this->encrypter = $encrypter; - $this->connection = $connection; - } - - /** - * Retrieve an item from the cache by key. - * - * @param string $key - * @return mixed - */ - public function get($key) - { - $prefixed = $this->prefix.$key; - - $cache = $this->table()->where('key', '=', $prefixed)->first(); - - // If we have a cache record we will check the expiration time against current - // time on the system and see if the record has expired. If it has, we will - // remove the records from the database table so it isn't returned again. - if ( ! is_null($cache)) - { - if (is_array($cache)) $cache = (object) $cache; - - if (time() >= $cache->expiration) - { - $this->forget($key); - - return null; - } - - return $this->encrypter->decrypt($cache->value); - } - } - - /** - * Store an item in the cache for a given number of minutes. - * - * @param string $key - * @param mixed $value - * @param int $minutes - * @return void - */ - public function put($key, $value, $minutes) - { - $key = $this->prefix.$key; - - // All of the cached values in the database are encrypted in case this is used - // as a session data store by the consumer. We'll also calculate the expire - // time and place that on the table so we will check it on our retrieval. - $value = $this->encrypter->encrypt($value); - - $expiration = $this->getTime() + ($minutes * 60); - - try - { - $this->table()->insert(compact('key', 'value', 'expiration')); - } - catch (\Exception $e) - { - $this->table()->where('key', '=', $key)->update(compact('value', 'expiration')); - } - } - - /** - * Increment the value of an item in the cache. - * - * @param string $key - * @param mixed $value - * @return void - * - * @throws \LogicException - */ - public function increment($key, $value = 1) - { - throw new \LogicException("Increment operations not supported by this driver."); - } - - /** - * Increment the value of an item in the cache. - * - * @param string $key - * @param mixed $value - * @return void - * - * @throws \LogicException - */ - public function decrement($key, $value = 1) - { - throw new \LogicException("Decrement operations not supported by this driver."); - } - - /** - * Get the current system time. - * - * @return int - */ - protected function getTime() - { - return time(); - } - - /** - * Store an item in the cache indefinitely. - * - * @param string $key - * @param mixed $value - * @return void - */ - public function forever($key, $value) - { - return $this->put($key, $value, 5256000); - } - - /** - * Remove an item from the cache. - * - * @param string $key - * @return void - */ - public function forget($key) - { - $this->table()->where('key', '=', $this->prefix.$key)->delete(); - } - - /** - * Remove all items from the cache. - * - * @return void - */ - public function flush() - { - $this->table()->delete(); - } - - /** - * Get a query builder for the cache table. - * - * @return \Illuminate\Database\Query\Builder - */ - protected function table() - { - return $this->connection->table($this->table); - } - - /** - * Get the underlying database connection. - * - * @return \Illuminate\Database\Connection - */ - public function getConnection() - { - return $this->connection; - } - - /** - * Get the encrypter instance. - * - * @return \Illuminate\Encryption\Encrypter - */ - public function getEncrypter() - { - return $this->encrypter; - } - - /** - * Get the cache key prefix. - * - * @return string - */ - public function getPrefix() - { - return $this->prefix; - } - -} http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/80fd786e/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php ---------------------------------------------------------------------- diff --git a/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php b/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php deleted file mode 100755 index dc97b5c..0000000 --- a/vendor/laravel/framework/src/Illuminate/Cache/FileStore.php +++ /dev/null @@ -1,257 +0,0 @@ -files = $files; - $this->directory = $directory; - } - - /** - * Retrieve an item from the cache by key. - * - * @param string $key - * @return mixed - */ - public function get($key) - { - return array_get($this->getPayload($key), 'data'); - } - - /** - * Retrieve an item and expiry time from the cache by key. - * - * @param string $key - * @return array - */ - protected function getPayload($key) - { - $path = $this->path($key); - - // If the file doesn't exists, we obviously can't return the cache so we will - // just return null. Otherwise, we'll get the contents of the file and get - // the expiration UNIX timestamps from the start of the file's contents. - if ( ! $this->files->exists($path)) - { - return array('data' => null, 'time' => null); - } - - try - { - $expire = substr($contents = $this->files->get($path), 0, 10); - } - catch (\Exception $e) - { - return array('data' => null, 'time' => null); - } - - // If the current time is greater than expiration timestamps we will delete - // the file and return null. This helps clean up the old files and keeps - // this directory much cleaner for us as old files aren't hanging out. - if (time() >= $expire) - { - $this->forget($key); - - return array('data' => null, 'time' => null); - } - - $data = unserialize(substr($contents, 10)); - - // Next, we'll extract the number of minutes that are remaining for a cache - // so that we can properly retain the time for things like the increment - // operation that may be performed on the cache. We'll round this out. - $time = ceil(($expire - time()) / 60); - - return compact('data', 'time'); - } - - /** - * Store an item in the cache for a given number of minutes. - * - * @param string $key - * @param mixed $value - * @param int $minutes - * @return void - */ - public function put($key, $value, $minutes) - { - $value = $this->expiration($minutes).serialize($value); - - $this->createCacheDirectory($path = $this->path($key)); - - $this->files->put($path, $value); - } - - /** - * Create the file cache directory if necessary. - * - * @param string $path - * @return void - */ - protected function createCacheDirectory($path) - { - try - { - $this->files->makeDirectory(dirname($path), 0777, true, true); - } - catch (\Exception $e) - { - // - } - } - - /** - * Increment the value of an item in the cache. - * - * @param string $key - * @param mixed $value - * @return int - */ - public function increment($key, $value = 1) - { - $raw = $this->getPayload($key); - - $int = ((int) $raw['data']) + $value; - - $this->put($key, $int, (int) $raw['time']); - - return $int; - } - - /** - * Decrement the value of an item in the cache. - * - * @param string $key - * @param mixed $value - * @return int - */ - public function decrement($key, $value = 1) - { - return $this->increment($key, $value * -1); - } - - /** - * Store an item in the cache indefinitely. - * - * @param string $key - * @param mixed $value - * @return void - */ - public function forever($key, $value) - { - return $this->put($key, $value, 0); - } - - /** - * Remove an item from the cache. - * - * @param string $key - * @return void - */ - public function forget($key) - { - $file = $this->path($key); - - if ($this->files->exists($file)) - { - $this->files->delete($file); - } - } - - /** - * Remove all items from the cache. - * - * @return void - */ - public function flush() - { - if ($this->files->isDirectory($this->directory)) - { - foreach ($this->files->directories($this->directory) as $directory) - { - $this->files->deleteDirectory($directory); - } - } - } - - /** - * Get the full path for the given cache key. - * - * @param string $key - * @return string - */ - protected function path($key) - { - $parts = array_slice(str_split($hash = md5($key), 2), 0, 2); - - return $this->directory.'/'.join('/', $parts).'/'.$hash; - } - - /** - * Get the expiration time based on the given minutes. - * - * @param int $minutes - * @return int - */ - protected function expiration($minutes) - { - if ($minutes === 0) return 9999999999; - - return time() + ($minutes * 60); - } - - /** - * Get the Filesystem instance. - * - * @return \Illuminate\Filesystem\Filesystem - */ - public function getFilesystem() - { - return $this->files; - } - - /** - * Get the working directory of the cache. - * - * @return string - */ - public function getDirectory() - { - return $this->directory; - } - - /** - * Get the cache key prefix. - * - * @return string - */ - public function getPrefix() - { - return ''; - } - -}