forked from daylerees/colour-schemes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbold.html
46 lines (40 loc) · 2.51 KB
/
bold.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<h1 style="background-color:#393434; color: #ffffff;">Bold</h1>
<pre style="font-family:Monaco, monospace; padding:2em; background-color: #2a2626; color: #ffffff;">
<?php
<span style="color: #3D8E91;">namespace</span> Illuminate\Container;
<span style="color: #3D8E91;">use</span> Closure;
<span style="color: #3D8E91;">use</span> ArrayAccess;
<span style="color: #534b4b;">/**
* Theme: Bold
* Bold.
*
* Copyright (c) 2014 Dayle Rees
*/</span>
<span style="color: #3D8E91;">class</span> Container <span style="color: #F0624B;">implements</span> ArrayAccess
{
<span style="color: #534b4b;">/**
* An array of the types that have been resolved.
*
* <span style="color: #6b6161;">@var</span> array
*/</span>
<span style="color: #F0624B;">protected</span> <span style="color: ;">$resolved</span> <span style="color: #3D8E91;">=</span> <span style="color: #3D8E91;">array</span>();
<span style="color: #534b4b;">/**
* Determine if a given type is shared.
*
* <span style="color: #6b6161;">@param</span> string $abstract
* <span style="color: #6b6161;">@return</span> bool
*/</span>
<span style="color: #F0624B;">public</span> <span style="color: #3D8E91;">function</span> <span style="color: #B4B7AD;">isShared</span>(<span style="color: ;">$abstract</span>)
{
<span style="color: #F0624B;">if</span> (<span style="color: #3D8E91;">isset</span>(<span style="color: ;">$this</span><span style="color: #F0624B;">-></span><span style="color: ;">bindings</span>[<span style="color: ;">$abstract</span>][<span style="color: #F7A21B;">'shared'</span>]))
{
<span style="color: ;">$shared</span> <span style="color: #F0624B;">=</span> <span style="color: ;">$this</span><span style="color: #F0624B;">-></span><span style="color: ;">bindings</span>[<span style="color: ;">$abstract</span>][<span style="color: #F7A21B;">'shared'</span>];
}
<span style="color: #F0624B;">else</span>
{
<span style="color: ;">$shared</span> <span style="color: #F0624B;">=</span> <span style="color: #F0624B;">false</span>;
}
<span style="color: #F0624B;">return</span> <span style="color: #3D8E91;">isset</span>(<span style="color: ;">$this</span><span style="color: #F0624B;">-></span><span style="color: ;">instances</span>[<span style="color: ;">$abstract</span>]) <span style="color: #F0624B;">||</span> <span style="color: ;">$shared</span> <span style="color: #F0624B;">===</span> <span style="color: #F0624B;">true</span>;
}
}
</pre>