Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #208 from pixelfederation/master
Optional $options parameter for the SQLParser
- Loading branch information
Showing
26 changed files
with
263 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ vendor/ | |
composer.lock | ||
clover.xml | ||
composer.phar | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
/** | ||
* @author mfris | ||
* | ||
*/ | ||
|
||
namespace PHPSQLParser; | ||
|
||
/** | ||
* | ||
* @author mfris | ||
* @package PHPSQLParser | ||
*/ | ||
final class Options | ||
{ | ||
|
||
/** | ||
* @var array | ||
*/ | ||
private $options; | ||
|
||
/** | ||
* @const string | ||
*/ | ||
const CONSISTENT_SUB_TREES = 'consistent_sub_trees'; | ||
|
||
/** | ||
* Options constructor. | ||
* | ||
* @param array $options | ||
*/ | ||
public function __construct(array $options) | ||
{ | ||
$this->options = $options; | ||
} | ||
|
||
/** | ||
* @return bool | ||
*/ | ||
public function getConsistentSubtrees() | ||
{ | ||
return (isset($this->options[self::CONSISTENT_SUB_TREES]) && $this->options[self::CONSISTENT_SUB_TREES]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.