Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
7bbcb51d
Commit
7bbcb51d
authored
Oct 05, 2007
by
Jonathan.Wage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed Spyc to DoctrineSpyc to avoid any conflicts with other libraries.
parent
a0857060
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
17 deletions
+17
-17
Yml.php
lib/Doctrine/Parser/Yml.php
+2
-2
spyc.php
lib/Doctrine/Parser/spyc.php
+15
-15
No files found.
lib/Doctrine/Parser/Yml.php
View file @
7bbcb51d
...
...
@@ -45,7 +45,7 @@ class Doctrine_Parser_Yml extends Doctrine_Parser
*/
public
function
dumpData
(
$array
,
$path
=
null
)
{
$spyc
=
new
Spyc
();
$spyc
=
new
Doctrine
Spyc
();
$yml
=
$spyc
->
dump
(
$array
,
false
,
false
);
...
...
@@ -66,7 +66,7 @@ class Doctrine_Parser_Yml extends Doctrine_Parser
*/
public
function
loadData
(
$path
)
{
$spyc
=
new
Spyc
();
$spyc
=
new
Doctrine
Spyc
();
$array
=
$spyc
->
load
(
$path
);
...
...
lib/Doctrine/Parser/spyc.php
View file @
7bbcb51d
<?php
/**
* Spyc -- A Simple PHP YAML Class
*
Doctrine
Spyc -- A Simple PHP YAML Class
* @version 0.2.(5) -- 2006-12-31
* @author Chris Wanstrath <chris@ozmm.org>
* @author Vlad Andersen <vlad@oneiros.ru>
* @link http://spyc.sourceforge.net/
* @copyright Copyright 2005-2006 Chris Wanstrath
* @license http://www.opensource.org/licenses/mit-license.php MIT License
* @package Spyc
* @package
Doctrine
Spyc
*/
/**
* A node, used by Spyc for parsing YAML.
* @package Spyc
* A node, used by
Doctrine
Spyc for parsing YAML.
* @package
Doctrine
Spyc
*/
class
YAMLNode
{
class
Doctrine
YAMLNode
{
/**#@+
* @access public
* @var string
...
...
@@ -43,7 +43,7 @@
* @access public
* @return void
*/
function
YAMLNode
(
$nodeId
)
{
function
Doctrine
YAMLNode
(
$nodeId
)
{
$this
->
id
=
$nodeId
;
}
}
...
...
@@ -57,12 +57,12 @@
*
* Usage:
* <code>
* $parser = new Spyc;
* $parser = new
Doctrine
Spyc;
* $array = $parser->load($file);
* </code>
* @package Spyc
* @package
Doctrine
Spyc
*/
class
Spyc
{
class
Doctrine
Spyc
{
/**
* Load YAML into a PHP array statically
...
...
@@ -72,7 +72,7 @@
* simple.
* Usage:
* <code>
* $array = Spyc::YAMLLoad('lucky.yaml');
* $array =
Doctrine
Spyc::YAMLLoad('lucky.yaml');
* print_r($array);
* </code>
* @access public
...
...
@@ -80,7 +80,7 @@
* @param string $input Path of YAML file or string containing YAML
*/
function
YAMLLoad
(
$input
)
{
$spyc
=
new
Spyc
;
$spyc
=
new
Doctrine
Spyc
;
return
$spyc
->
load
(
$input
);
}
...
...
@@ -105,7 +105,7 @@
* @param int $wordwrap Pass in 0 for no wordwrap, false for default (40)
*/
function
YAMLDump
(
$array
,
$indent
=
false
,
$wordwrap
=
false
)
{
$spyc
=
new
Spyc
;
$spyc
=
new
Doctrine
Spyc
;
return
$spyc
->
dump
(
$array
,
$indent
,
$wordwrap
);
}
...
...
@@ -116,7 +116,7 @@
* will do its best to convert the YAML into a PHP array. Pretty simple.
* Usage:
* <code>
* $parser = new Spyc;
* $parser = new
Doctrine
Spyc;
* $array = $parser->load('lucky.yaml');
* print_r($array);
* </code>
...
...
@@ -134,7 +134,7 @@
$yaml
=
explode
(
"
\n
"
,
$input
);
}
// Initiate some objects and values
$base
=
new
YAMLNode
(
1
);
$base
=
new
Doctrine
YAMLNode
(
1
);
$base
->
indent
=
0
;
$this
->
_lastIndent
=
0
;
$this
->
_lastNode
=
$base
->
id
;
...
...
@@ -159,7 +159,7 @@
$last
->
data
[
key
(
$last
->
data
)]
.=
"
\n
"
;
}
elseif
(
$ifchk
{
0
}
!=
'#'
&&
substr
(
$ifchk
,
0
,
3
)
!=
'---'
)
{
// Create a new node and get its indent
$node
=
new
YAMLNode
(
$this
->
_nodeId
);
$node
=
new
Doctrine
YAMLNode
(
$this
->
_nodeId
);
$this
->
_nodeId
++
;
$node
->
indent
=
$this
->
_getIndent
(
$line
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment