Skip to content

Commit c062418

Browse files
committed
fixing conflicts.
2 parents 0f5ffdf + 22f99bc commit c062418

File tree

4 files changed

+83
-33
lines changed

4 files changed

+83
-33
lines changed

laravel/auth/drivers/driver.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
use Laravel\Config;
66
use Laravel\Session;
77
use Laravel\Crypter;
8-
use Laravel\Database\Eloquent\Model as Eloquent;
98

109
abstract class Driver {
1110

laravel/auth/drivers/eloquent.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,29 @@ public function attempt($arguments = array())
6666
return false;
6767
}
6868

69+
/**
70+
* Login the user assigned to the given token.
71+
*
72+
* The token is typically a numeric ID for the user.
73+
*
74+
* @param mixed $token
75+
* @param bool $remember
76+
* @return bool
77+
*/
78+
public function login($token, $remember = false)
79+
{
80+
// if the token is an Eloquent model get the primary key
81+
if ($token instanceof \Eloquent) $token = $token->get_key();
82+
83+
$this->token = $token;
84+
85+
$this->store($token);
86+
87+
if ($remember) $this->remember($token);
88+
89+
return true;
90+
}
91+
6992
/**
7093
* Get a fresh model instance.
7194
*

laravel/blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,12 @@ protected static function compile_forelse($value)
213213

214214
foreach ($matches[0] as $forelse)
215215
{
216-
preg_match('/\$[^\s]*/', $forelse, $variable);
216+
preg_match('/\s*\(\s*(\S*)\s/', $forelse, $variable);
217217

218218
// Once we have extracted the variable being looped against, we can add
219219
// an if statement to the start of the loop that checks if the count
220220
// of the variable being looped against is greater than zero.
221-
$if = "<?php if (count({$variable[0]}) > 0): ?>";
221+
$if = "<?php if (count({$variable[1]}) > 0): ?>";
222222

223223
$search = '/(\s*)@forelse(\s*\(.*\))/';
224224

laravel/cli/dependencies.php

Lines changed: 58 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,95 +6,123 @@
66
* of the migration resolver and database classes, which are used
77
* to perform various support functions for the migrator.
88
*/
9-
IoC::register('task: migrate', function()
9+
if(! IoC::registered('task: migrate'))
1010
{
11-
$database = new Tasks\Migrate\Database;
11+
IoC::register('task: migrate', function()
12+
{
13+
$database = new Tasks\Migrate\Database;
1214

13-
$resolver = new Tasks\Migrate\Resolver($database);
15+
$resolver = new Tasks\Migrate\Resolver($database);
16+
17+
return new Tasks\Migrate\Migrator($resolver, $database);
18+
});
19+
}
1420

15-
return new Tasks\Migrate\Migrator($resolver, $database);
16-
});
1721

1822
/**
1923
* The bundle task is responsible for the installation of bundles
2024
* and their dependencies. It utilizes the bundles API to get the
2125
* meta-data for the available bundles.
2226
*/
23-
IoC::register('task: bundle', function()
27+
if(! IoC::registered('task: bundle'))
2428
{
25-
$repository = IoC::resolve('bundle.repository');
29+
IoC::register('task: bundle', function()
30+
{
31+
$repository = IoC::resolve('bundle.repository');
2632

27-
return new Tasks\Bundle\Bundler($repository);
28-
});
33+
return new Tasks\Bundle\Bundler($repository);
34+
});
35+
}
2936

3037
/**
3138
* The key task is responsible for generating a secure, random
3239
* key for use by the application when encrypting strings or
3340
* setting the hash values on cookie signatures.
3441
*/
35-
IoC::singleton('task: key', function()
42+
if(! IoC::registered('task: key'))
3643
{
37-
return new Tasks\Key;
38-
});
44+
IoC::singleton('task: key', function()
45+
{
46+
return new Tasks\Key;
47+
});
48+
}
3949

4050
/**
4151
* The session task is responsible for performing tasks related
4252
* to the session store of the application. It can do things
4353
* such as generating the session table or clearing expired
4454
* sessions from storage.
4555
*/
46-
IoC::singleton('task: session', function()
56+
if(! IoC::registered('task: session'))
4757
{
48-
return new Tasks\Session\Manager;
49-
});
58+
IoC::singleton('task: session', function()
59+
{
60+
return new Tasks\Session\Manager;
61+
});
62+
}
5063

5164
/**
5265
* The route task is responsible for calling routes within the
5366
* application and dumping the result. This allows for simple
5467
* testing of APIs and JSON based applications.
5568
*/
56-
IoC::singleton('task: route', function()
69+
if(! IoC::registered('task: route'))
5770
{
58-
return new Tasks\Route;
59-
});
71+
IoC::singleton('task: route', function()
72+
{
73+
return new Tasks\Route;
74+
});
75+
}
6076

6177
/**
6278
* The "test" task is responsible for running the unit tests for
6379
* the application, bundles, and the core framework itself.
6480
* It provides a nice wrapper around PHPUnit.
6581
*/
66-
IoC::singleton('task: test', function()
82+
if(! IoC::registered('task: test'))
6783
{
68-
return new Tasks\Test\Runner;
69-
});
84+
IoC::singleton('task: test', function()
85+
{
86+
return new Tasks\Test\Runner;
87+
});
88+
}
7089

7190
/**
7291
* The bundle repository is responsible for communicating with
7392
* the Laravel bundle sources to get information regarding any
7493
* bundles that are requested for installation.
7594
*/
76-
IoC::singleton('bundle.repository', function()
95+
if(! IoC::registered('bundle.repository'))
7796
{
78-
return new Tasks\Bundle\Repository;
79-
});
97+
IoC::singleton('bundle.repository', function()
98+
{
99+
return new Tasks\Bundle\Repository;
100+
});
101+
}
80102

81103
/**
82104
* The bundle publisher is responsible for publishing bundle
83105
* assets to their correct directories within the install,
84106
* such as the web accessible directory.
85107
*/
86-
IoC::singleton('bundle.publisher', function()
108+
if(! IoC::registered('bundle.publisher'))
87109
{
88-
return new Tasks\Bundle\Publisher;
89-
});
110+
IoC::singleton('bundle.publisher', function()
111+
{
112+
return new Tasks\Bundle\Publisher;
113+
});
114+
}
90115

91116
/**
92117
* The Github bundle provider installs bundles that live on
93118
* Github. This provider will add the bundle as a submodule
94119
* and will update the submodule so that the bundle is
95120
* installed into the bundle directory.
96121
*/
97-
IoC::singleton('bundle.provider: github', function()
122+
if(! IoC::registered('bundle.provider: github'))
98123
{
99-
return new Tasks\Bundle\Providers\Github;
100-
});
124+
IoC::singleton('bundle.provider: github', function()
125+
{
126+
return new Tasks\Bundle\Providers\Github;
127+
});
128+
}

0 commit comments

Comments
 (0)