\\
145 | throw new ABException("Function $name is not implemented yet.", 34);
146 | }
147 | }
148 | }
149 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | 
3 |
4 | ---
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | Runtime SQL like query lanaguage for manipulate php arrays. written in pure php and not using any sql engine. Note:- this is not an any kind of query builder.
15 |
16 | ## Installation
17 |
18 | You can install arraybase on composer package manager by using below command.
19 |
20 | ```
21 | composer require whizsid/arraybase
22 | ```
23 |
24 | ## Basic
25 |
26 | ### Creating an ArrayBase instance
27 | This is how we are creating an array base instance.
28 |
29 | ```
30 | use WhizSid\ArrayBase\AB;
31 |
32 | $ab = new AB;
33 | ```
34 | ArrayBase is simpler than other SQL Engines.
35 |
36 | ### Creating an ArrayBase Table
37 |
38 | ```
39 | use WhizSid\ArrayBase\AB\Table;
40 | use WhizSid\ArrayBase\AB\Table\Column;
41 |
42 | $ab->createTable('customers',function(Table $tbl){
43 | $tbl->createColumn('cus_id',function(Column $clmn){
44 | $clmn->setType('integer')->setAutoIncrement();
45 | });
46 | $tbl->createColumn('cus_name',function(Column $clmn){
47 | $clmn->setType('varchar');
48 | });
49 | $tbl->createColumn('cus_phone',function(Column $clmn){
50 | $clmn->setType('varchar');
51 | })
52 | });
53 |
54 | ```
55 | Or with data array.
56 |
57 | ```
58 | $ab->createTable('tbl_another',[
59 | [
60 | 'c_id'=>1,
61 | 'ant_id'=>"A"
62 | ],
63 | [
64 | 'c_id'=>2,
65 | 'ant_id'=>"B"
66 | ]
67 | ]);
68 |
69 | ```
70 |
71 | ### Join Clause
72 | ```
73 | use WhizSid\ArrayBase\AB\Query\Clause\Join;
74 |
75 | $query = $ab->query();
76 |
77 | $select = $query->select($ab->tbl_customer->as('cus'));
78 |
79 | $select->join($ab->tbl_customer_cv->as('cv'))->on($query->cv->c_id,$query->cus->c_id);
80 |
81 | $results = $select->execute();
82 | ```
83 |
84 | ## Where Clause
85 | ```
86 | $select->where($query->cus->c_id,"4567")->and($query->cv->c_name,"my name");
87 | ```
88 |
89 | ## Limit
90 | ```
91 | $select->limit(10,20);
92 | ```
93 |
94 | ## Order
95 | ```
96 | $select->orderBy($query->cus->c_name)->orderBy($query->cus->c_address,"desc");
97 | ```
98 |
99 | ### Select query
100 |
101 | ```
102 | $selectQuery = $ab->query()->select(
103 | $ab->tbl_customer,
104 | $ab::groupConcat(AB_DISTINCT,$ab->tbl_facility->fac_code)->as('new_sum'),
105 | $ab->tbl_customer->c_id,
106 | $ab->tbl_another->ant_id,
107 | $ab->tbl_facility->fac_code
108 | );
109 |
110 | $selectQuery->join(AB_JOIN_INNER,$ab->tbl_facility)->on($ab->tbl_customer->c_id,'=',$ab->tbl_facility->c_id);
111 | $selectQuery->join(AB_JOIN_INNER,$ab->tbl_another)->on($ab->tbl_customer->c_id,'=',$ab->tbl_another->c_id);
112 | $selectQuery->orderBy($ab->tbl_customer->c_id,'desc');
113 | $selectQuery->groupBy($ab->tbl_another->ant_id);
114 | $selectQuery->where($ab->tbl_another->ant_id,'=',"A");
115 | $selectQuery->limit(1);
116 | $result = $selectQuery->execute()->fetchAssoc();
117 | ```
118 |
119 | ### Update Query
120 |
121 | ```
122 | $updateQuery = $ab->query()->update($ab->tbl_customer)->set($ab->tbl_customer->c_name,'Updated name');
123 | $updateQuery->where($ab->tbl_another->ant_id,"B");
124 | $updateQuery->join(AB_JOIN_INNER,$ab->tbl_another)->on($ab->tbl_another->c_id,'=',$ab->tbl_customer->c_id);
125 | $updateQuery->limit(1);
126 | $updateQuery->execute();
127 | ```
128 |
129 | ### Delete query
130 |
131 | ```
132 | $deleteQuery = $ab->query()->delete($ab->tbl_customer);
133 | $deleteQuery->where($ab->tbl_another->ant_id,"B");
134 | $deleteQuery->join(AB_JOIN_INNER,$ab->tbl_another)->on($ab->tbl_another->c_id,'=',$ab->tbl_customer->c_id);
135 | $deleteQuery->limit(1);
136 | $deleteQuery->execute();
137 | ```
138 |
139 | All Examples in the `example/index.php` file.
140 |
141 | ## Goals
142 |
143 | To bring all MySQL functions to PHP.
144 |
145 | [Read the full documentation](https://whizsid.github.io/arraybase)
146 |
147 |
148 |
--------------------------------------------------------------------------------
/src/Query/Type/Select.php:
--------------------------------------------------------------------------------
1 | table = $tbl;
45 | // Registering the table
46 | $this->query->addTable($tbl);
47 |
48 | return $this;
49 | }
50 |
51 | /**
52 | * Returning the base table.
53 | *
54 | * @return Table
55 | */
56 | public function getFrom()
57 | {
58 | return $this->table;
59 | }
60 |
61 | /**
62 | * Setting columns in select clause.
63 | *
64 | * @param Column[] ...$columns
65 | *
66 | * @return void
67 | */
68 | public function setColumns(...$columns)
69 | {
70 | $this->columns = array_merge($this->columns, $columns);
71 |
72 | return $this;
73 | }
74 |
75 | /**
76 | * Returning the columns.
77 | *
78 | * @return Column[]
79 | */
80 | public function getColumns()
81 | {
82 | return $this->columns;
83 | }
84 |
85 | /**
86 | * {@inheritdoc}
87 | */
88 | public function execute()
89 | {
90 | $startTime = \microtime(true);
91 | $this->resolveDataSet();
92 |
93 | $this->executeJoin();
94 | $this->executeWhere();
95 | $this->executeOrder();
96 | $this->executeGroupBy();
97 | $this->executeSelect();
98 | $this->executeLimit();
99 |
100 | $endTime = \microtime(true);
101 |
102 | $returnSet = new ReturnSet();
103 | $returnSet->setDataSet($this->dataSet);
104 | $returnSet->setTime($endTime - $startTime);
105 |
106 | return $returnSet;
107 | }
108 |
109 | public function executeSelect()
110 | {
111 | $columns = $this->columns;
112 |
113 | $dataSet = new DataSet();
114 |
115 | $columns = $this->columns;
116 |
117 | if (empty($columns)) {
118 | $columns = array_values($this->table->getColumns());
119 |
120 | foreach ($this->joins as $key => $join) {
121 | $table = $join->getTable();
122 |
123 | $joinedTableColumns = array_values($table->getColumns());
124 |
125 | $columns = array_merge($columns, $joinedTableColumns);
126 | }
127 | }
128 |
129 | foreach ($columns as $column) {
130 | $dataSet->newColumn(Parser::parseName($column));
131 | }
132 |
133 | $rows = [];
134 |
135 | if ($this->grouped) {
136 | /** @var GroupedDataSet $groupedSet */
137 | foreach ($this->groupedSets as $key=>$groupedSet) {
138 | $row = new Row();
139 | $row->setDataSet($dataSet);
140 | $row->setIndex($key);
141 | foreach ($columns as $column) {
142 | $row->newCell($groupedSet->getValue($column));
143 | }
144 | $rows[] = $row;
145 | }
146 | } else {
147 | $count = $this->dataSet->getCount();
148 |
149 | for ($i = 0; $i < $count; $i++) {
150 | $row = new Row();
151 | $row->setDataSet($dataSet);
152 | $row->setIndex($i);
153 | foreach ($columns as $column) {
154 | $row->newCell($this->dataSet->getValue($column, $i));
155 | }
156 | $rows[] = $row;
157 | }
158 | }
159 |
160 | $dataSet->__setRows($rows);
161 | $this->dataSet = $dataSet;
162 | }
163 | }
164 |
--------------------------------------------------------------------------------
/src/Query/Type/Insert.php:
--------------------------------------------------------------------------------
1 | dataSet = Helper::parseDataArray($arr);
38 |
39 | return $this;
40 | }
41 |
42 | /**
43 | * Inserting a data set directly.
44 | *
45 | * @param DataSet $set
46 | *
47 | * @return self
48 | */
49 | public function dataSet($set)
50 | {
51 | $this->dataSet = $set;
52 |
53 | return $this;
54 | }
55 |
56 | /**
57 | * Table to insert data.
58 | *
59 | * @param Table $table
60 | *
61 | * @return self
62 | */
63 | public function into($table)
64 | {
65 | if ($table->isAliased()) {
66 | // \\
67 | throw new ABException('Aliased tables is not valid to insert queries.', 24);
68 | }
69 | $this->table = $table;
70 |
71 | return $this;
72 | }
73 |
74 | /**
75 | * Inserting data from another query.
76 | *
77 | * @param Select $selectQuery
78 | */
79 | public function query($selectQuery)
80 | {
81 | }
82 |
83 | /**
84 | * Validating the query.
85 | *
86 | * @throws ABException
87 | *
88 | * @return void
89 | */
90 | public function __validate()
91 | {
92 | if (!isset($this->dataSet)) {
93 | // \\
94 | throw new ABException('Please provide a data set to insert query', 21);
95 | }
96 | if (!isset($this->dataSet)) {
97 | // \\
98 | throw new ABException('Please provide a table to insert data', 22);
99 | }
100 | }
101 |
102 | /**
103 | * Execute the query.
104 | *
105 | * @return DataSet
106 | */
107 | public function execute()
108 | {
109 | $startTime = microtime(true);
110 |
111 | $this->__validate();
112 |
113 | $lastId = $this->executeInsert();
114 |
115 | $endTime = microtime(true);
116 |
117 | $returnSet = new ReturnSet();
118 |
119 | $returnSet->setAffectedRowsCount($this->dataSet->getCount());
120 | $returnSet->setTime($endTime - $startTime);
121 | $returnSet->setLastIndex($lastId);
122 |
123 | return $returnSet;
124 | }
125 |
126 | protected function executeInsert()
127 | {
128 | $set = $this->dataSet;
129 | $oldSet = $this->table->__getDataSet();
130 |
131 | $aliases = $set->getAliases();
132 |
133 | foreach ($aliases as $alias) {
134 | if (array_search($alias, $this->table->getColumnNames()) < 0) {
135 | // \\
136 | throw new ABException("Invalid column name '$alias' in new Dataset.", 20);
137 | }
138 | }
139 |
140 | $rowCount = $set->getCount();
141 |
142 | // Creating a new data set
143 | $newSet = new DataSet();
144 |
145 | $originalAliases = $oldSet->getAliases();
146 |
147 | for ($i = 0; $i < $rowCount; $i++) {
148 | $newRow = $newSet->newRow();
149 | $oldRow = $set->getRow($i);
150 |
151 | foreach ($originalAliases as $key => $originalAlias) {
152 | if ($i == 0) {
153 | $newSet->addAlias($originalAlias);
154 | }
155 | $srcIndex = array_search($originalAlias, $aliases);
156 | $column = $this->table->getColumn($originalAlias);
157 |
158 | $value = null;
159 | if (is_numeric($srcIndex)) {
160 | $cell = $oldRow->getCell($srcIndex);
161 | $value = $cell ? $cell->getValue() : null;
162 | } elseif ($column->isAutoIncrement()) {
163 | $value = $newRow->getIndex() + 1;
164 | }
165 |
166 | if (is_null($value)) {
167 | $value = $column->getDefaultValue();
168 | }
169 |
170 | $column->validateValue($value);
171 |
172 | $newRow->newCell($value);
173 | }
174 | }
175 |
176 | $oldSet->mergeDataSet($newSet);
177 |
178 | return $oldSet->getCount() - 1;
179 | }
180 | }
181 |
--------------------------------------------------------------------------------
/src/Query/Traits/Joinable.php:
--------------------------------------------------------------------------------
1 | setAB($this->ab)->setQuery($this->query);
48 |
49 | $join->setTable($tbl);
50 |
51 | $this->joins[] = $join;
52 |
53 | return $join;
54 | }
55 |
56 | /**
57 | * Transforming the aliases in a dataset by prepending table name.
58 | *
59 | * @param string $tableName
60 | * @param DataSet $dataSetOrg
61 | *
62 | * @return DataSet
63 | */
64 | protected function __globalizeDataSet($tableName, $dataSetOrg)
65 | {
66 | $dataSet = $dataSetOrg->cloneMe();
67 | $dataSet->globalizeMe($tableName);
68 |
69 | return $dataSet;
70 | }
71 |
72 | /**
73 | * Making new data set by merging dual rows.
74 | *
75 | * @param Row $firstRow
76 | * @param Row $secondRow
77 | *
78 | * @return DataSet
79 | */
80 | protected function makeNewSetByDualRows($firstRow, $secondRow)
81 | {
82 | $fristAliases = $firstRow->getDataSet()->getAliases();
83 | $secondAliases = $secondRow->getDataSet()->getAliases();
84 | $index = $firstRow->getIndex();
85 |
86 | $tmpDataSet = new DataSet();
87 |
88 | foreach ($fristAliases as $key => $alias) {
89 | $tmpDataSet->addColumnData($alias, [$firstRow->getCell($key)]);
90 | }
91 |
92 | foreach ($secondAliases as $key => $alias) {
93 | if (!in_array($alias, $fristAliases)) {
94 | $tmpDataSet->addColumnData($alias, [$secondRow->getCell($key)]);
95 | }
96 | }
97 |
98 | $row = $tmpDataSet->getRow(0);
99 | $row->setIndex($index);
100 |
101 | return $tmpDataSet;
102 | }
103 |
104 | /**
105 | * Executing the join clause in the query.
106 | *
107 | * @return DataSet
108 | */
109 | public function executeJoin()
110 | {
111 |
112 | /** @var Join $join */
113 | foreach ($this->joins as $join) {
114 | $table = $join->getTable();
115 |
116 | $mode = $join->getMode();
117 |
118 | /** @var DataSet $joiningDataSet */
119 | $joiningDataSet = $this->__globalizeDataSet($table->getName(), $table->__getDataSet());
120 |
121 | if ($mode == AB_JOIN_RIGHT) {
122 | $rightDataSet = $this->dataSet;
123 | $leftDataSet = $joiningDataSet;
124 | } else {
125 | $rightDataSet = $joiningDataSet;
126 | $leftDataSet = $this->dataSet;
127 | }
128 |
129 | $joinedSet = new DataSet();
130 |
131 | $leftAliases = $leftDataSet->getAliases();
132 | $rightAliases = $rightDataSet->getAliases();
133 |
134 | foreach ($leftAliases as $leftAliase) {
135 | $joinedSet->newColumn($leftAliase);
136 | }
137 |
138 | foreach ($rightAliases as $rightAliase) {
139 | if (!in_array($rightAliase, $leftAliases)) {
140 | $joinedSet->newColumn($rightAliase);
141 | }
142 | }
143 |
144 | $leftDataSetCount = $leftDataSet->getCount();
145 | $rightDataSetCount = $rightDataSet->getCount();
146 |
147 | for ($i = 0; $i < $leftDataSetCount; $i++) {
148 | $leftRow = $leftDataSet->getRow($i);
149 |
150 | $foundOneRight = false;
151 | for ($j = 0; $j < $rightDataSetCount; $j++) {
152 | if (!($foundOneRight && $mode != AB_JOIN_INNER)) {
153 | $rightRow = $rightDataSet->getRow($j);
154 |
155 | $tmpDataSet = $this->makeNewSetByDualRows($leftRow, $rightRow);
156 |
157 | $on = $join->getOnCluase();
158 |
159 | $matched = $on->setDataSet($tmpDataSet)->execute(0);
160 |
161 | if ($matched) {
162 | if ($mode != AB_JOIN_OUTER) {
163 | $foundOneRight = true;
164 | }
165 |
166 | $newSet = $this->makeNewSetByDualRows($leftRow, $rightRow);
167 |
168 | $joinedSet->mergeDataSet($newSet);
169 | } elseif ($mode != AB_JOIN_INNER && $j == $rightDataSetCount - 1 && $i == $leftDataSetCount - 1) {
170 | $newSet = $this->makeNewSetByDualRows($leftRow, $rightRow->newNullRow(count($rightAliases)));
171 |
172 | $joinedSet->mergeDataSet($newSet);
173 |
174 | if ($mode == AB_JOIN_OUTER) {
175 | $newSet = $this->makeNewSetByDualRows($leftRow->newNullRow(count($leftAliases)), $rightRow);
176 |
177 | $joinedSet->mergeDataSet($newSet);
178 | }
179 | }
180 | }
181 | }
182 | }
183 |
184 | $this->dataSet = $joinedSet;
185 | }
186 | }
187 | }
188 |
--------------------------------------------------------------------------------
/src/Helper.php:
--------------------------------------------------------------------------------
1 | 'WhizSid\ArrayBase\AB\Table',
35 | 'column' => 'WhizSid\ArrayBase\AB\Table\Column',
36 | 'bindedcolumn'=> 'WhizSid\ArrayBase\Query\Objects\ColumnWithIndex',
37 | 'dataset' => 'WhizSid\ArrayBase\AB\DataSet',
38 | 'cell' => 'WhizSid\ArrayBase\AB\DataSet\Row\Cell',
39 | 'query' => 'WhizSid\ArrayBase\Query',
40 | 'selectquery' => 'WhizSid\ArrayBase\Query\Type\Select',
41 | 'updatequery' => 'WhizSid\ArrayBase\Query\Type\Update',
42 | 'insertquery' => 'WhizSid\ArrayBase\Query\Type\Insert',
43 | 'deletequery' => 'WhizSid\ArrayBase\Query\Type\Delete',
44 | ];
45 |
46 | /**
47 | * Parsing data array to dataset.
48 | *
49 | * @param array $arr
50 | *
51 | * @return DataSet
52 | */
53 | public static function parseDataArray($arr)
54 | {
55 | $dataSet = new DataSet();
56 |
57 | $keys = array_keys($arr);
58 |
59 | if (is_numeric($keys[0])) {
60 | $secondKeys = array_keys($arr[$keys[0]]);
61 | if (is_string($secondKeys[0])) {
62 | foreach ($arr as $key => $row) {
63 | $dataSetRow = $dataSet->newRow();
64 |
65 | foreach ($row as $secondKey=>$cell) {
66 | if ($key == 0) {
67 | $dataSet->addAlias($secondKey);
68 | }
69 |
70 | $dataSetRow->newCell($cell);
71 | }
72 | }
73 | } else {
74 | // \\
75 | throw new ABException('Suplied array format is invalid to parseDataArray.', 17);
76 | }
77 | } elseif (is_string($keys[0])) {
78 | $row = $dataSet->newRow();
79 |
80 | foreach ($arr as $cellName=>$value) {
81 | $dataSet->addAlias($cellName);
82 |
83 | $row->newCell($value);
84 | }
85 | } else {
86 | // \\
87 | throw new ABException('Suplied array format is invalid to parseDataArray.', 17);
88 | }
89 |
90 | return $dataSet;
91 | }
92 |
93 | /**
94 | * Passing multidimentional assoc array as a table.
95 | *
96 | * @param AB $ab
97 | * @param string $name
98 | * @param array $arr
99 | */
100 | public static function parseTable($ab, $name, $arr)
101 | {
102 | $dataSet = self::parseDataArray($arr);
103 |
104 | if (!$dataSet->getCount()) {
105 | // \\
106 | throw new ABException('Can not parse empty data set as a table', 25);
107 | }
108 | // Creating a array base table
109 | $ab->createTable($name, function (Table $tbl) use ($dataSet) {
110 | $firstRow = $dataSet->getRow(0);
111 |
112 | $aliases = $dataSet->getAliases();
113 |
114 | foreach ($aliases as $cellIndex => $alias) {
115 | $cell = $firstRow->getCell($cellIndex);
116 |
117 | if (is_numeric($cell->getValue())) {
118 | $type = 'integer';
119 | } elseif (is_float($cell->getValue())) {
120 | $type = 'decimal';
121 | } elseif (is_string($cell->getValue())) {
122 | $type = 'varchar';
123 | } else {
124 | // \\
125 | throw new ABException('Invalid cell value supplied to parsing array', 26);
126 | }
127 |
128 | $tbl->createColumn($alias, function (Column $clmn) use ($type) {
129 | $clmn->setType($type);
130 | });
131 | }
132 | });
133 |
134 | $table = $ab->getTable($name);
135 |
136 | $ab->query()->insert()->into($table)->dataSet($dataSet)->execute();
137 |
138 | return $table;
139 | }
140 |
141 | /**
142 | * Converting a string in underscore notaion to PascalCase.
143 | *
144 | * @param string $str
145 | *
146 | * @return string
147 | */
148 | public static function pascalCase($str)
149 | {
150 | $camelCased = preg_replace_callback('/_([a-zA-Z0-9])/', function ($matched) {
151 | return strtoupper($matched[1]);
152 | }, $str);
153 |
154 | return ucfirst($camelCased);
155 | }
156 |
157 | /**
158 | * Checking the given value is in the correct type.
159 | */
160 | public static function __callStatic($name, $arguments)
161 | {
162 | if (strtolower(substr($name, 0, 2)) == 'is' && count($arguments) == 1) {
163 | if (isset(self::$types[strtolower(substr($name, 2))])) {
164 | return is_object($arguments[0]) && self::$types[strtolower(substr($name, 2))] == get_class($arguments[0]);
165 | } else {
166 | // \\
167 | throw new ABException("Invalid type supplied. Can not find the type $name.", 28);
168 | }
169 | } else {
170 | throw new BadMethodCallException('Invalid function called.');
171 | }
172 | }
173 |
174 | /**
175 | * Checking a parsed value is a function or not.
176 | *
177 | * @param ABFunction $func
178 | *
179 | * @return bool
180 | */
181 | public static function isFunction($func)
182 | {
183 | return is_subclass_of($func, ABFunction::class);
184 | }
185 |
186 | /**
187 | * Checking a parsed value is a agregate function or not.
188 | *
189 | * @param Agregate $func
190 | *
191 | * @return bool
192 | */
193 | public static function isAgregate($func)
194 | {
195 | return is_subclass_of($func, Agregate::class);
196 | }
197 | }
198 |
--------------------------------------------------------------------------------
/src/AB/Table/Column.php:
--------------------------------------------------------------------------------
1 | 'Date',
51 | 'integer'=> 'Integer',
52 | 'varchar'=> 'VarChar',
53 | ];
54 | /**
55 | * You can also write comments to columns.
56 | *
57 | * @var string
58 | */
59 | protected $comment;
60 |
61 | /**
62 | * Creating a column to a table.
63 | *
64 | * @param string $name
65 | */
66 | public function __construct($name)
67 | {
68 | $this->name = $name;
69 | }
70 |
71 | /**
72 | * Setting column type.
73 | *
74 | * @param string $str
75 | *
76 | * @throws ABException
77 | *
78 | * @return void
79 | */
80 | public function setType($str)
81 | {
82 | $this->validateName();
83 |
84 | if (!in_array($str, array_keys($this->dataTypeAliases))) {
85 | // \\
86 | throw new ABException('Invalid type "'.$str.'" for column "'.$this->name.'". Available types is '.implode(',', array_keys($this->dataTypeAliases)), 3);
87 | }
88 | $typeFullName = '\WhizSid\ArrayBase\AB\Table\DataType\\'.$this->dataTypeAliases[$str];
89 |
90 | $this->type = new $typeFullName();
91 |
92 | $this->setMaxLength();
93 | }
94 |
95 | /**
96 | * Getting the column type.
97 | *
98 | * @return DataType\DataType
99 | */
100 | public function getType()
101 | {
102 | return $this->type;
103 | }
104 |
105 | /**
106 | * Validating the column name.
107 | *
108 | * @throws ABException
109 | *
110 | * @return void
111 | */
112 | protected function validateName()
113 | {
114 | if (!isset($this->name)) {
115 | // \\
116 | throw new ABException('Please set a name to the column.', 4);
117 | }
118 | }
119 |
120 | /**
121 | * Validating type.
122 | *
123 | * @throws ABException
124 | *
125 | * @return void
126 | */
127 | protected function validateType()
128 | {
129 | if (!isset($this->type)) {
130 | // \\
131 | throw new ABException('Please set a type to the column.', 5);
132 | }
133 | }
134 |
135 | /**
136 | * Validating column required properties.
137 | *
138 | * @return void
139 | */
140 | public function validate()
141 | {
142 | $this->validateName();
143 | $this->validateType();
144 | }
145 |
146 | /**
147 | * Setting max length for the column.
148 | *
149 | * @param int $max
150 | */
151 | public function setMaxLength(int $max = null)
152 | {
153 | $this->validate();
154 |
155 | if (!$max) {
156 | $max = $this->type->getDefaultMaxLength();
157 | }
158 |
159 | $this->type->validateMaxLength($max);
160 |
161 | $this->maxLength = $max;
162 | }
163 |
164 | /**
165 | * Returning the max length for the column.
166 | *
167 | * @return int
168 | */
169 | public function getMaxLength()
170 | {
171 | return $this->maxLength;
172 | }
173 |
174 | /**
175 | * Setting a default value to column.
176 | *
177 | * @param mixed $data
178 | *
179 | * @return void
180 | */
181 | public function setDefaultValue($data)
182 | {
183 | $this->validate();
184 |
185 | $content = $data;
186 | if (is_callable($data)) {
187 | $content = $data();
188 | }
189 |
190 | $this->validateValue($content);
191 |
192 | $this->default = $data;
193 | }
194 |
195 | /**
196 | * Validating a given value by the column type.
197 | *
198 | * @param mixed $value
199 | *
200 | * @throws ABException
201 | *
202 | * @return void
203 | */
204 | public function validateValue($value)
205 | {
206 | if (!is_null($value) && !$this->type->validate($value)) {
207 | // \\
208 | throw new ABException('Invalid value provided to column. The value should be in "'.$this->type->getName().'" type.', 6);
209 | }
210 | if (!is_null($value) && $this->maxLength < strlen($value)) {
211 | // \\
212 | throw new ABException('Supplied value is greater than the max length.', 7);
213 | }
214 | if (!$this->nullable && is_null($value)) {
215 | // \\
216 | throw new ABException('Empty value supplied to non nullable column.', 8);
217 | }
218 | }
219 |
220 | /**
221 | * Getting default value for column.
222 | *
223 | * @return mixed
224 | */
225 | public function getDefaultValue()
226 | {
227 | if (is_callable($this->default)) {
228 | return $this->default();
229 | } else {
230 | return $this->default;
231 | }
232 | }
233 |
234 | /**
235 | * Setting the column to auto incrementing.
236 | *
237 | * @param bool $ai
238 | *
239 | * @throws ABException
240 | *
241 | * @return void
242 | */
243 | public function setAutoIncrement(bool $ai = true)
244 | {
245 | $this->validate();
246 |
247 | // \\
248 | if ($this->type->getName() !== 'integer') {
249 | throw new ABException('We are allowing auto increment only for integer type columns', 9);
250 | }
251 | $this->autoIncrement = $ai;
252 | }
253 |
254 | /**
255 | * Determine the column has set to auto increment.
256 | *
257 | * @return bool
258 | */
259 | public function isAutoIncrement()
260 | {
261 | return $this->autoIncrement;
262 | }
263 |
264 | /**
265 | * Setting nullable to columns.
266 | *
267 | * @param bool $nl
268 | *
269 | * @throws ABException
270 | *
271 | * @return void
272 | */
273 | public function setNullable(bool $nl = true)
274 | {
275 | $this->validate();
276 |
277 | // \\
278 | if ($this->autoIncrement) {
279 | throw new ABException('We are not allowing to set nullable on auto incrementing columns', 10);
280 | }
281 | $this->nullable = $nl;
282 | }
283 |
284 | /**
285 | * Determine the weather the column has nullable attribute or not.
286 | *
287 | * @return bool
288 | */
289 | public function isNullable()
290 | {
291 | return $this->nullable;
292 | }
293 |
294 | /**
295 | * Write a comment to the column.
296 | *
297 | * @param string $cmnt
298 | */
299 | public function writeComment($cmnt)
300 | {
301 | $this->validate();
302 |
303 | // \\
304 | if (strlen($cmnt) > self::COMMENT_MAX_LENGTH) {
305 | throw new ABException('The comment max character length is '.self::COMMENT_MAX_LENGTH.'. Please summerize your comment.', 11);
306 | }
307 | $this->comment = substr($cmnt, 0, self::COMMENT_MAX_LENGTH);
308 | }
309 |
310 | /**
311 | * Getting the wrote comment.
312 | *
313 | * @return string
314 | */
315 | public function getComment()
316 | {
317 | $this->validate();
318 |
319 | return $this->comment;
320 | }
321 |
322 | /**
323 | * Reterning the full name with table name.
324 | *
325 | * @return string
326 | */
327 | public function getFullName()
328 | {
329 | return $this->getTable()->getName().'.'.$this->getName();
330 | }
331 | }
332 |
--------------------------------------------------------------------------------
/src/AB/DataSet.php:
--------------------------------------------------------------------------------
1 | rows[$key];
43 | }
44 |
45 | /**
46 | * Returning the count of data set.
47 | *
48 | * @return int
49 | */
50 | public function getCount()
51 | {
52 | return count($this->rows);
53 | }
54 |
55 | /**
56 | * Creating a new row.
57 | *
58 | * @return Row
59 | */
60 | public function newRow()
61 | {
62 | $row = new Row();
63 |
64 | $row->setDataSet($this);
65 |
66 | $index = $this->getCount();
67 | $row->setIndex($index);
68 |
69 | $this->rows[] = $row;
70 |
71 | return $row;
72 | }
73 |
74 | /**
75 | * Add a column alias to the data set.
76 | *
77 | * @param string $alias
78 | */
79 | public function addAlias($alias)
80 | {
81 | $this->aliases[] = $alias;
82 | }
83 |
84 | /**
85 | * Renaming a alias.
86 | *
87 | * @param string $from
88 | * @param string $to
89 | *
90 | * @return void
91 | */
92 | public function renameAlias($from, $to)
93 | {
94 | $index = $this->searchAlias($from);
95 |
96 | if ($index >= 0) {
97 | $this->aliases[$index] = $to;
98 | } else {
99 | // \\
100 | throw new ABException("Can not find an alias with given name '$from'.", 18);
101 | }
102 | }
103 |
104 | /**
105 | * Returning the aliases list for the given dataset.
106 | *
107 | * @return string[]
108 | */
109 | public function getAliases()
110 | {
111 | return $this->aliases;
112 | }
113 |
114 | /**
115 | * Returning the rows for data set.
116 | *
117 | * @return Row[]
118 | */
119 | public function __getRows()
120 | {
121 | return $this->rows;
122 | }
123 |
124 | /**
125 | * Merge a data set to current data set.
126 | *
127 | * @param DataSet $set
128 | *
129 | * @return void
130 | */
131 | public function mergeDataSet($set)
132 | {
133 | $rows = $set->__getRows();
134 |
135 | if (count($set->getAliases()) != count($this->getAliases())) {
136 | // \\
137 | throw new ABException('Column counts not matching for the new data set', 19);
138 | }
139 | $this->rows = array_merge($this->rows, $rows);
140 | }
141 |
142 | /**
143 | * Fixing another data set with the data set.
144 | *
145 | * @param DataSet $set
146 | *
147 | * @return void
148 | */
149 | public function fixDataSet($set)
150 | {
151 | $aliases = $set->getAliases();
152 |
153 | foreach ($aliases as $key=> $alias) {
154 | $columnData = $set->getColumnData($key);
155 | $this->addColumnData($alias, $columnData);
156 | }
157 | }
158 |
159 | /**
160 | * Returning a column data set.
161 | *
162 | * @param string|int $columnName
163 | *
164 | * @return Cell[]
165 | */
166 | public function getColumnData($columnName)
167 | {
168 | $index = is_string($columnName) ? $this->searchAlias($columnName) : $columnName;
169 |
170 | if ($index < 0) {
171 | // \\
172 | throw new ABException("Can not find an alias with given name '$columnName'.", 18);
173 | }
174 | $cells = [];
175 |
176 | foreach ($this->rows as $key => $row) {
177 | $cells[] = $row->getCell($index);
178 | }
179 |
180 | return $cells;
181 | }
182 |
183 | /**
184 | * Merging new column data set.
185 | *
186 | * @param string $name
187 | * @param Cell[] $data
188 | */
189 | public function addColumnData($name, $data)
190 | {
191 | $exists = false;
192 |
193 | try {
194 | $this->searchAlias($name);
195 |
196 | $exists = true;
197 | } catch (\Exception $e) {
198 | $exists = false;
199 | }
200 |
201 | if ($exists) {
202 | // \\
203 | throw new ABException('Column already in field list', 30);
204 | }
205 | if (!empty($this->getCount()) && count($data) != $this->getCount()) {
206 | // \\
207 | throw new ABException('Row count is not matching for new data set.', 23);
208 | }
209 | $this->addAlias($name);
210 |
211 | if (count($this->aliases) == 1) {
212 | foreach ($data as $cell) {
213 | $row = $this->newRow();
214 | $row->newCell($cell);
215 | }
216 | } else {
217 | foreach ($this->rows as $key => &$row) {
218 | $row->newCell($data[$key]);
219 | }
220 | }
221 | }
222 |
223 | /**
224 | * Creating a new empty column.
225 | *
226 | * @param string $name
227 | * @param mixed $defaultValue
228 | *
229 | * @return void
230 | */
231 | public function newColumn($name, $defaultValue = null)
232 | {
233 | $this->aliases[] = $name;
234 |
235 | foreach ($this->rows as $row) {
236 | $row->newCell($defaultValue);
237 | }
238 | }
239 |
240 | /**
241 | * Returning the cell by row index and cell name or index.
242 | *
243 | * @param int|string|Column $column
244 | * @param int $rowIndex
245 | *
246 | * @return Cell
247 | */
248 | public function getCell($column, $rowIndex)
249 | {
250 | $row = $this->getRow($rowIndex);
251 |
252 | if (Helper::isColumn($column)) {
253 | $column = $column->getTable()->getName().'.'.$column->getName();
254 | }
255 |
256 | if (is_numeric($column)) {
257 | $index = $column;
258 | } else {
259 | $index = $this->searchAlias($column);
260 | }
261 |
262 | return $row->getCell($index);
263 | }
264 |
265 | /**
266 | * Searching for a alias and return the index of alias.
267 | *
268 | * @param string $alias
269 | *
270 | * @return int
271 | */
272 | public function searchAlias($string)
273 | {
274 | $matchedAmb = [];
275 |
276 | $aliases = $this->aliases;
277 |
278 | foreach ($aliases as $key=> $alias) {
279 | $explodedAlias = explode('.', $alias);
280 | $explodedString = explode('.', $string);
281 |
282 | if (count($explodedString) == 2) {
283 | if (count($explodedAlias) == 2) {
284 | if ($alias == $string) {
285 | return $key;
286 | }
287 | } else {
288 | if ($alias == $explodedString[1]) {
289 | return $key;
290 | }
291 | }
292 | } else {
293 | if (count($explodedAlias) == 2) {
294 | if ($explodedAlias[1] == $string) {
295 | $matchedAmb[] = $key;
296 | }
297 | } else {
298 | if ($alias == $string) {
299 | return $key;
300 | }
301 | }
302 | }
303 |
304 | if (count($matchedAmb) > 1) {
305 | // \\
306 | throw new Column("Column '$string' is ambigous. ", 29);
307 | }
308 | }
309 |
310 | if (count($matchedAmb) == 1) {
311 | return $matchedAmb[0];
312 | }
313 |
314 | // \\
315 | throw new ABException("Unknown column '$string' in field list.", 31);
316 | }
317 |
318 | /**
319 | * Setting the rows.
320 | *
321 | * @param Row[] $rows
322 | *
323 | * @return void
324 | */
325 | public function __setRows($rows)
326 | {
327 | $this->rows = $rows;
328 | }
329 |
330 | /**
331 | * Deep cloning a dataset.
332 | *
333 | * @return self
334 | */
335 | public function cloneMe()
336 | {
337 | $rows = $this->rows;
338 |
339 | $clonedMe = clone $this;
340 |
341 | $clonedRows = [];
342 |
343 | foreach ($rows as $row) {
344 | $clonedRow = clone $row;
345 | $clonedRow->setDataSet($clonedMe);
346 | $clonedRows[] = $clonedRow;
347 | }
348 |
349 | $clonedMe->__setRows($clonedRows);
350 |
351 | return $clonedMe;
352 | }
353 |
354 | /**
355 | * Globalizing the data set by prepending a name to all aliases.
356 | *
357 | * @param string $name
358 | *
359 | * @return bool
360 | */
361 | public function globalizeMe($name)
362 | {
363 | if ($this->globalized) {
364 | return false;
365 | }
366 |
367 | $dataSetAliases = $this->getAliases();
368 |
369 | foreach ($dataSetAliases as $dataSetAliase) {
370 | $this->renameAlias($dataSetAliase, $name.'.'.$dataSetAliase);
371 | }
372 |
373 | return true;
374 | }
375 |
376 | /**
377 | * Returning an value from dataset.
378 | *
379 | * @param mixed $var
380 | *
381 | * @return mixed
382 | */
383 | public function getValue($var, $rowIndex)
384 | {
385 | if (Helper::isColumn($var)) {
386 | return $this->getCell($var, $rowIndex)->getValue();
387 | } elseif (Helper::isFunction($var)) {
388 | return $var->setDataSet($this)->execute($rowIndex);
389 | } else {
390 | return $var;
391 | }
392 | }
393 | }
394 |
--------------------------------------------------------------------------------
/logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
244 |
--------------------------------------------------------------------------------
/composer.lock:
--------------------------------------------------------------------------------
1 | {
2 | "_readme": [
3 | "This file locks the dependencies of your project to a known state",
4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5 | "This file is @generated automatically"
6 | ],
7 | "content-hash": "f9c3c4215a012dc712e83afad6f64d85",
8 | "packages": [],
9 | "packages-dev": [
10 | {
11 | "name": "doctrine/instantiator",
12 | "version": "dev-master",
13 | "source": {
14 | "type": "git",
15 | "url": "https://github.com/doctrine/instantiator.git",
16 | "reference": "8c8c1afee0f929f17528fe1721de5d58e15f71c7"
17 | },
18 | "dist": {
19 | "type": "zip",
20 | "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8c8c1afee0f929f17528fe1721de5d58e15f71c7",
21 | "reference": "8c8c1afee0f929f17528fe1721de5d58e15f71c7",
22 | "shasum": ""
23 | },
24 | "require": {
25 | "php": "^7.1"
26 | },
27 | "require-dev": {
28 | "doctrine/coding-standard": "^5.0",
29 | "ext-pdo": "*",
30 | "ext-phar": "*",
31 | "phpbench/phpbench": "^0.13",
32 | "phpstan/phpstan-shim": "^0.9.2",
33 | "phpunit/phpunit": "^7.0"
34 | },
35 | "type": "library",
36 | "extra": {
37 | "branch-alias": {
38 | "dev-master": "1.2.x-dev"
39 | }
40 | },
41 | "autoload": {
42 | "psr-4": {
43 | "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
44 | }
45 | },
46 | "notification-url": "https://packagist.org/downloads/",
47 | "license": [
48 | "MIT"
49 | ],
50 | "authors": [
51 | {
52 | "name": "Marco Pivetta",
53 | "email": "ocramius@gmail.com",
54 | "homepage": "http://ocramius.github.com/"
55 | }
56 | ],
57 | "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors",
58 | "homepage": "https://www.doctrine-project.org/projects/instantiator.html",
59 | "keywords": [
60 | "constructor",
61 | "instantiate"
62 | ],
63 | "time": "2018-10-15T11:30:00+00:00"
64 | },
65 | {
66 | "name": "myclabs/deep-copy",
67 | "version": "1.x-dev",
68 | "source": {
69 | "type": "git",
70 | "url": "https://github.com/myclabs/DeepCopy.git",
71 | "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8"
72 | },
73 | "dist": {
74 | "type": "zip",
75 | "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8",
76 | "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8",
77 | "shasum": ""
78 | },
79 | "require": {
80 | "php": "^7.1"
81 | },
82 | "replace": {
83 | "myclabs/deep-copy": "self.version"
84 | },
85 | "require-dev": {
86 | "doctrine/collections": "^1.0",
87 | "doctrine/common": "^2.6",
88 | "phpunit/phpunit": "^7.1"
89 | },
90 | "type": "library",
91 | "autoload": {
92 | "psr-4": {
93 | "DeepCopy\\": "src/DeepCopy/"
94 | },
95 | "files": [
96 | "src/DeepCopy/deep_copy.php"
97 | ]
98 | },
99 | "notification-url": "https://packagist.org/downloads/",
100 | "license": [
101 | "MIT"
102 | ],
103 | "description": "Create deep copies (clones) of your objects",
104 | "keywords": [
105 | "clone",
106 | "copy",
107 | "duplicate",
108 | "object",
109 | "object graph"
110 | ],
111 | "time": "2018-06-11T23:09:50+00:00"
112 | },
113 | {
114 | "name": "phar-io/manifest",
115 | "version": "1.0.1",
116 | "source": {
117 | "type": "git",
118 | "url": "https://github.com/phar-io/manifest.git",
119 | "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0"
120 | },
121 | "dist": {
122 | "type": "zip",
123 | "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0",
124 | "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0",
125 | "shasum": ""
126 | },
127 | "require": {
128 | "ext-dom": "*",
129 | "ext-phar": "*",
130 | "phar-io/version": "^1.0.1",
131 | "php": "^5.6 || ^7.0"
132 | },
133 | "type": "library",
134 | "extra": {
135 | "branch-alias": {
136 | "dev-master": "1.0.x-dev"
137 | }
138 | },
139 | "autoload": {
140 | "classmap": [
141 | "src/"
142 | ]
143 | },
144 | "notification-url": "https://packagist.org/downloads/",
145 | "license": [
146 | "BSD-3-Clause"
147 | ],
148 | "authors": [
149 | {
150 | "name": "Arne Blankerts",
151 | "email": "arne@blankerts.de",
152 | "role": "Developer"
153 | },
154 | {
155 | "name": "Sebastian Heuer",
156 | "email": "sebastian@phpeople.de",
157 | "role": "Developer"
158 | },
159 | {
160 | "name": "Sebastian Bergmann",
161 | "email": "sebastian@phpunit.de",
162 | "role": "Developer"
163 | }
164 | ],
165 | "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
166 | "time": "2017-03-05T18:14:27+00:00"
167 | },
168 | {
169 | "name": "phar-io/version",
170 | "version": "1.0.1",
171 | "source": {
172 | "type": "git",
173 | "url": "https://github.com/phar-io/version.git",
174 | "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df"
175 | },
176 | "dist": {
177 | "type": "zip",
178 | "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df",
179 | "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df",
180 | "shasum": ""
181 | },
182 | "require": {
183 | "php": "^5.6 || ^7.0"
184 | },
185 | "type": "library",
186 | "autoload": {
187 | "classmap": [
188 | "src/"
189 | ]
190 | },
191 | "notification-url": "https://packagist.org/downloads/",
192 | "license": [
193 | "BSD-3-Clause"
194 | ],
195 | "authors": [
196 | {
197 | "name": "Arne Blankerts",
198 | "email": "arne@blankerts.de",
199 | "role": "Developer"
200 | },
201 | {
202 | "name": "Sebastian Heuer",
203 | "email": "sebastian@phpeople.de",
204 | "role": "Developer"
205 | },
206 | {
207 | "name": "Sebastian Bergmann",
208 | "email": "sebastian@phpunit.de",
209 | "role": "Developer"
210 | }
211 | ],
212 | "description": "Library for handling version information and constraints",
213 | "time": "2017-03-05T17:38:23+00:00"
214 | },
215 | {
216 | "name": "phpdocumentor/reflection-common",
217 | "version": "1.0.1",
218 | "source": {
219 | "type": "git",
220 | "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
221 | "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
222 | },
223 | "dist": {
224 | "type": "zip",
225 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
226 | "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
227 | "shasum": ""
228 | },
229 | "require": {
230 | "php": ">=5.5"
231 | },
232 | "require-dev": {
233 | "phpunit/phpunit": "^4.6"
234 | },
235 | "type": "library",
236 | "extra": {
237 | "branch-alias": {
238 | "dev-master": "1.0.x-dev"
239 | }
240 | },
241 | "autoload": {
242 | "psr-4": {
243 | "phpDocumentor\\Reflection\\": [
244 | "src"
245 | ]
246 | }
247 | },
248 | "notification-url": "https://packagist.org/downloads/",
249 | "license": [
250 | "MIT"
251 | ],
252 | "authors": [
253 | {
254 | "name": "Jaap van Otterdijk",
255 | "email": "opensource@ijaap.nl"
256 | }
257 | ],
258 | "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
259 | "homepage": "http://www.phpdoc.org",
260 | "keywords": [
261 | "FQSEN",
262 | "phpDocumentor",
263 | "phpdoc",
264 | "reflection",
265 | "static analysis"
266 | ],
267 | "time": "2017-09-11T18:02:19+00:00"
268 | },
269 | {
270 | "name": "phpdocumentor/reflection-docblock",
271 | "version": "4.3.0",
272 | "source": {
273 | "type": "git",
274 | "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
275 | "reference": "94fd0001232e47129dd3504189fa1c7225010d08"
276 | },
277 | "dist": {
278 | "type": "zip",
279 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08",
280 | "reference": "94fd0001232e47129dd3504189fa1c7225010d08",
281 | "shasum": ""
282 | },
283 | "require": {
284 | "php": "^7.0",
285 | "phpdocumentor/reflection-common": "^1.0.0",
286 | "phpdocumentor/type-resolver": "^0.4.0",
287 | "webmozart/assert": "^1.0"
288 | },
289 | "require-dev": {
290 | "doctrine/instantiator": "~1.0.5",
291 | "mockery/mockery": "^1.0",
292 | "phpunit/phpunit": "^6.4"
293 | },
294 | "type": "library",
295 | "extra": {
296 | "branch-alias": {
297 | "dev-master": "4.x-dev"
298 | }
299 | },
300 | "autoload": {
301 | "psr-4": {
302 | "phpDocumentor\\Reflection\\": [
303 | "src/"
304 | ]
305 | }
306 | },
307 | "notification-url": "https://packagist.org/downloads/",
308 | "license": [
309 | "MIT"
310 | ],
311 | "authors": [
312 | {
313 | "name": "Mike van Riel",
314 | "email": "me@mikevanriel.com"
315 | }
316 | ],
317 | "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
318 | "time": "2017-11-30T07:14:17+00:00"
319 | },
320 | {
321 | "name": "phpdocumentor/type-resolver",
322 | "version": "0.4.0",
323 | "source": {
324 | "type": "git",
325 | "url": "https://github.com/phpDocumentor/TypeResolver.git",
326 | "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
327 | },
328 | "dist": {
329 | "type": "zip",
330 | "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
331 | "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
332 | "shasum": ""
333 | },
334 | "require": {
335 | "php": "^5.5 || ^7.0",
336 | "phpdocumentor/reflection-common": "^1.0"
337 | },
338 | "require-dev": {
339 | "mockery/mockery": "^0.9.4",
340 | "phpunit/phpunit": "^5.2||^4.8.24"
341 | },
342 | "type": "library",
343 | "extra": {
344 | "branch-alias": {
345 | "dev-master": "1.0.x-dev"
346 | }
347 | },
348 | "autoload": {
349 | "psr-4": {
350 | "phpDocumentor\\Reflection\\": [
351 | "src/"
352 | ]
353 | }
354 | },
355 | "notification-url": "https://packagist.org/downloads/",
356 | "license": [
357 | "MIT"
358 | ],
359 | "authors": [
360 | {
361 | "name": "Mike van Riel",
362 | "email": "me@mikevanriel.com"
363 | }
364 | ],
365 | "time": "2017-07-14T14:27:02+00:00"
366 | },
367 | {
368 | "name": "phpspec/prophecy",
369 | "version": "dev-master",
370 | "source": {
371 | "type": "git",
372 | "url": "https://github.com/phpspec/prophecy.git",
373 | "reference": "3660b2eed90abdf92ac2e9dae9a238d2701bfa77"
374 | },
375 | "dist": {
376 | "type": "zip",
377 | "url": "https://api.github.com/repos/phpspec/prophecy/zipball/3660b2eed90abdf92ac2e9dae9a238d2701bfa77",
378 | "reference": "3660b2eed90abdf92ac2e9dae9a238d2701bfa77",
379 | "shasum": ""
380 | },
381 | "require": {
382 | "doctrine/instantiator": "^1.0.2",
383 | "php": "^5.3|^7.0",
384 | "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
385 | "sebastian/comparator": "^1.1|^2.0|^3.0",
386 | "sebastian/recursion-context": "^1.0|^2.0|^3.0"
387 | },
388 | "require-dev": {
389 | "phpspec/phpspec": "^2.5|^3.2",
390 | "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
391 | },
392 | "type": "library",
393 | "extra": {
394 | "branch-alias": {
395 | "dev-master": "1.8.x-dev"
396 | }
397 | },
398 | "autoload": {
399 | "psr-0": {
400 | "Prophecy\\": "src/"
401 | }
402 | },
403 | "notification-url": "https://packagist.org/downloads/",
404 | "license": [
405 | "MIT"
406 | ],
407 | "authors": [
408 | {
409 | "name": "Konstantin Kudryashov",
410 | "email": "ever.zet@gmail.com",
411 | "homepage": "http://everzet.com"
412 | },
413 | {
414 | "name": "Marcello Duarte",
415 | "email": "marcello.duarte@gmail.com"
416 | }
417 | ],
418 | "description": "Highly opinionated mocking framework for PHP 5.3+",
419 | "homepage": "https://github.com/phpspec/prophecy",
420 | "keywords": [
421 | "Double",
422 | "Dummy",
423 | "fake",
424 | "mock",
425 | "spy",
426 | "stub"
427 | ],
428 | "time": "2018-11-04T18:50:11+00:00"
429 | },
430 | {
431 | "name": "phpunit/php-code-coverage",
432 | "version": "6.0.5",
433 | "source": {
434 | "type": "git",
435 | "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
436 | "reference": "4cab20a326d14de7575a8e235c70d879b569a57a"
437 | },
438 | "dist": {
439 | "type": "zip",
440 | "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/4cab20a326d14de7575a8e235c70d879b569a57a",
441 | "reference": "4cab20a326d14de7575a8e235c70d879b569a57a",
442 | "shasum": ""
443 | },
444 | "require": {
445 | "ext-dom": "*",
446 | "ext-xmlwriter": "*",
447 | "php": "^7.1",
448 | "phpunit/php-file-iterator": "^1.4.2",
449 | "phpunit/php-text-template": "^1.2.1",
450 | "phpunit/php-token-stream": "^3.0",
451 | "sebastian/code-unit-reverse-lookup": "^1.0.1",
452 | "sebastian/environment": "^3.1",
453 | "sebastian/version": "^2.0.1",
454 | "theseer/tokenizer": "^1.1"
455 | },
456 | "require-dev": {
457 | "phpunit/phpunit": "^7.0"
458 | },
459 | "suggest": {
460 | "ext-xdebug": "^2.6.0"
461 | },
462 | "type": "library",
463 | "extra": {
464 | "branch-alias": {
465 | "dev-master": "6.0-dev"
466 | }
467 | },
468 | "autoload": {
469 | "classmap": [
470 | "src/"
471 | ]
472 | },
473 | "notification-url": "https://packagist.org/downloads/",
474 | "license": [
475 | "BSD-3-Clause"
476 | ],
477 | "authors": [
478 | {
479 | "name": "Sebastian Bergmann",
480 | "email": "sebastian@phpunit.de",
481 | "role": "lead"
482 | }
483 | ],
484 | "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.",
485 | "homepage": "https://github.com/sebastianbergmann/php-code-coverage",
486 | "keywords": [
487 | "coverage",
488 | "testing",
489 | "xunit"
490 | ],
491 | "time": "2018-05-28T11:49:20+00:00"
492 | },
493 | {
494 | "name": "phpunit/php-file-iterator",
495 | "version": "1.4.x-dev",
496 | "source": {
497 | "type": "git",
498 | "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
499 | "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
500 | },
501 | "dist": {
502 | "type": "zip",
503 | "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
504 | "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
505 | "shasum": ""
506 | },
507 | "require": {
508 | "php": ">=5.3.3"
509 | },
510 | "type": "library",
511 | "extra": {
512 | "branch-alias": {
513 | "dev-master": "1.4.x-dev"
514 | }
515 | },
516 | "autoload": {
517 | "classmap": [
518 | "src/"
519 | ]
520 | },
521 | "notification-url": "https://packagist.org/downloads/",
522 | "license": [
523 | "BSD-3-Clause"
524 | ],
525 | "authors": [
526 | {
527 | "name": "Sebastian Bergmann",
528 | "email": "sb@sebastian-bergmann.de",
529 | "role": "lead"
530 | }
531 | ],
532 | "description": "FilterIterator implementation that filters files based on a list of suffixes.",
533 | "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
534 | "keywords": [
535 | "filesystem",
536 | "iterator"
537 | ],
538 | "time": "2017-11-27T13:52:08+00:00"
539 | },
540 | {
541 | "name": "phpunit/php-text-template",
542 | "version": "1.2.1",
543 | "source": {
544 | "type": "git",
545 | "url": "https://github.com/sebastianbergmann/php-text-template.git",
546 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
547 | },
548 | "dist": {
549 | "type": "zip",
550 | "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
551 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
552 | "shasum": ""
553 | },
554 | "require": {
555 | "php": ">=5.3.3"
556 | },
557 | "type": "library",
558 | "autoload": {
559 | "classmap": [
560 | "src/"
561 | ]
562 | },
563 | "notification-url": "https://packagist.org/downloads/",
564 | "license": [
565 | "BSD-3-Clause"
566 | ],
567 | "authors": [
568 | {
569 | "name": "Sebastian Bergmann",
570 | "email": "sebastian@phpunit.de",
571 | "role": "lead"
572 | }
573 | ],
574 | "description": "Simple template engine.",
575 | "homepage": "https://github.com/sebastianbergmann/php-text-template/",
576 | "keywords": [
577 | "template"
578 | ],
579 | "time": "2015-06-21T13:50:34+00:00"
580 | },
581 | {
582 | "name": "phpunit/php-timer",
583 | "version": "dev-master",
584 | "source": {
585 | "type": "git",
586 | "url": "https://github.com/sebastianbergmann/php-timer.git",
587 | "reference": "9ef9968ba27999219d76ae3cef97aa0fa87bd90f"
588 | },
589 | "dist": {
590 | "type": "zip",
591 | "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/9ef9968ba27999219d76ae3cef97aa0fa87bd90f",
592 | "reference": "9ef9968ba27999219d76ae3cef97aa0fa87bd90f",
593 | "shasum": ""
594 | },
595 | "require": {
596 | "php": "^7.1"
597 | },
598 | "require-dev": {
599 | "phpunit/phpunit": "^7.0"
600 | },
601 | "type": "library",
602 | "extra": {
603 | "branch-alias": {
604 | "dev-master": "2.0-dev"
605 | }
606 | },
607 | "autoload": {
608 | "classmap": [
609 | "src/"
610 | ]
611 | },
612 | "notification-url": "https://packagist.org/downloads/",
613 | "license": [
614 | "BSD-3-Clause"
615 | ],
616 | "authors": [
617 | {
618 | "name": "Sebastian Bergmann",
619 | "email": "sebastian@phpunit.de",
620 | "role": "lead"
621 | }
622 | ],
623 | "description": "Utility class for timing",
624 | "homepage": "https://github.com/sebastianbergmann/php-timer/",
625 | "keywords": [
626 | "timer"
627 | ],
628 | "time": "2018-06-04T07:17:52+00:00"
629 | },
630 | {
631 | "name": "phpunit/php-token-stream",
632 | "version": "dev-master",
633 | "source": {
634 | "type": "git",
635 | "url": "https://github.com/sebastianbergmann/php-token-stream.git",
636 | "reference": "6df086c042b6bb4fbcfcda15b8e52d5f8955aaee"
637 | },
638 | "dist": {
639 | "type": "zip",
640 | "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/6df086c042b6bb4fbcfcda15b8e52d5f8955aaee",
641 | "reference": "6df086c042b6bb4fbcfcda15b8e52d5f8955aaee",
642 | "shasum": ""
643 | },
644 | "require": {
645 | "ext-tokenizer": "*",
646 | "php": "^7.1"
647 | },
648 | "require-dev": {
649 | "phpunit/phpunit": "^7.0"
650 | },
651 | "type": "library",
652 | "extra": {
653 | "branch-alias": {
654 | "dev-master": "3.0-dev"
655 | }
656 | },
657 | "autoload": {
658 | "classmap": [
659 | "src/"
660 | ]
661 | },
662 | "notification-url": "https://packagist.org/downloads/",
663 | "license": [
664 | "BSD-3-Clause"
665 | ],
666 | "authors": [
667 | {
668 | "name": "Sebastian Bergmann",
669 | "email": "sebastian@phpunit.de"
670 | }
671 | ],
672 | "description": "Wrapper around PHP's tokenizer extension.",
673 | "homepage": "https://github.com/sebastianbergmann/php-token-stream/",
674 | "keywords": [
675 | "tokenizer"
676 | ],
677 | "time": "2018-10-30T07:50:55+00:00"
678 | },
679 | {
680 | "name": "phpunit/phpunit",
681 | "version": "7.0.0",
682 | "source": {
683 | "type": "git",
684 | "url": "https://github.com/sebastianbergmann/phpunit.git",
685 | "reference": "9b3373439fdf2f3e9d1578f5e408a3a0d161c3bc"
686 | },
687 | "dist": {
688 | "type": "zip",
689 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9b3373439fdf2f3e9d1578f5e408a3a0d161c3bc",
690 | "reference": "9b3373439fdf2f3e9d1578f5e408a3a0d161c3bc",
691 | "shasum": ""
692 | },
693 | "require": {
694 | "ext-dom": "*",
695 | "ext-json": "*",
696 | "ext-libxml": "*",
697 | "ext-mbstring": "*",
698 | "ext-xml": "*",
699 | "myclabs/deep-copy": "^1.6.1",
700 | "phar-io/manifest": "^1.0.1",
701 | "phar-io/version": "^1.0",
702 | "php": "^7.1",
703 | "phpspec/prophecy": "^1.7",
704 | "phpunit/php-code-coverage": "^6.0",
705 | "phpunit/php-file-iterator": "^1.4.3",
706 | "phpunit/php-text-template": "^1.2.1",
707 | "phpunit/php-timer": "^2.0",
708 | "phpunit/phpunit-mock-objects": "^6.0",
709 | "sebastian/comparator": "^2.1",
710 | "sebastian/diff": "^3.0",
711 | "sebastian/environment": "^3.1",
712 | "sebastian/exporter": "^3.1",
713 | "sebastian/global-state": "^2.0",
714 | "sebastian/object-enumerator": "^3.0.3",
715 | "sebastian/resource-operations": "^1.0",
716 | "sebastian/version": "^2.0.1"
717 | },
718 | "require-dev": {
719 | "ext-pdo": "*"
720 | },
721 | "suggest": {
722 | "ext-xdebug": "*",
723 | "phpunit/php-invoker": "^2.0"
724 | },
725 | "bin": [
726 | "phpunit"
727 | ],
728 | "type": "library",
729 | "extra": {
730 | "branch-alias": {
731 | "dev-master": "7.0-dev"
732 | }
733 | },
734 | "autoload": {
735 | "classmap": [
736 | "src/"
737 | ]
738 | },
739 | "notification-url": "https://packagist.org/downloads/",
740 | "license": [
741 | "BSD-3-Clause"
742 | ],
743 | "authors": [
744 | {
745 | "name": "Sebastian Bergmann",
746 | "email": "sebastian@phpunit.de",
747 | "role": "lead"
748 | }
749 | ],
750 | "description": "The PHP Unit Testing framework.",
751 | "homepage": "https://phpunit.de/",
752 | "keywords": [
753 | "phpunit",
754 | "testing",
755 | "xunit"
756 | ],
757 | "time": "2018-02-02T05:04:08+00:00"
758 | },
759 | {
760 | "name": "phpunit/phpunit-mock-objects",
761 | "version": "dev-master",
762 | "source": {
763 | "type": "git",
764 | "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
765 | "reference": "0dfddc236629eb7ead4df2dfa3d79d548e011a3b"
766 | },
767 | "dist": {
768 | "type": "zip",
769 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/0dfddc236629eb7ead4df2dfa3d79d548e011a3b",
770 | "reference": "0dfddc236629eb7ead4df2dfa3d79d548e011a3b",
771 | "shasum": ""
772 | },
773 | "require": {
774 | "doctrine/instantiator": "^1.0.5",
775 | "php": "^7.1",
776 | "phpunit/php-text-template": "^1.2.1",
777 | "sebastian/exporter": "^3.1"
778 | },
779 | "require-dev": {
780 | "phpunit/phpunit": "^7.0"
781 | },
782 | "suggest": {
783 | "ext-soap": "*"
784 | },
785 | "type": "library",
786 | "extra": {
787 | "branch-alias": {
788 | "dev-master": "6.1-dev"
789 | }
790 | },
791 | "autoload": {
792 | "classmap": [
793 | "src/"
794 | ]
795 | },
796 | "notification-url": "https://packagist.org/downloads/",
797 | "license": [
798 | "BSD-3-Clause"
799 | ],
800 | "authors": [
801 | {
802 | "name": "Sebastian Bergmann",
803 | "email": "sebastian@phpunit.de",
804 | "role": "lead"
805 | }
806 | ],
807 | "description": "Mock Object library for PHPUnit",
808 | "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/",
809 | "keywords": [
810 | "mock",
811 | "xunit"
812 | ],
813 | "time": "2018-09-09T05:49:38+00:00"
814 | },
815 | {
816 | "name": "sebastian/code-unit-reverse-lookup",
817 | "version": "dev-master",
818 | "source": {
819 | "type": "git",
820 | "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
821 | "reference": "22f5f5ff892d51035dd1fb4cd6b224a640ffb206"
822 | },
823 | "dist": {
824 | "type": "zip",
825 | "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/22f5f5ff892d51035dd1fb4cd6b224a640ffb206",
826 | "reference": "22f5f5ff892d51035dd1fb4cd6b224a640ffb206",
827 | "shasum": ""
828 | },
829 | "require": {
830 | "php": "^5.6 || ^7.0"
831 | },
832 | "require-dev": {
833 | "phpunit/phpunit": "^5.7 || ^6.0"
834 | },
835 | "type": "library",
836 | "extra": {
837 | "branch-alias": {
838 | "dev-master": "1.0.x-dev"
839 | }
840 | },
841 | "autoload": {
842 | "classmap": [
843 | "src/"
844 | ]
845 | },
846 | "notification-url": "https://packagist.org/downloads/",
847 | "license": [
848 | "BSD-3-Clause"
849 | ],
850 | "authors": [
851 | {
852 | "name": "Sebastian Bergmann",
853 | "email": "sebastian@phpunit.de"
854 | }
855 | ],
856 | "description": "Looks up which function or method a line of code belongs to",
857 | "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
858 | "time": "2018-05-15T05:52:48+00:00"
859 | },
860 | {
861 | "name": "sebastian/comparator",
862 | "version": "2.1.3",
863 | "source": {
864 | "type": "git",
865 | "url": "https://github.com/sebastianbergmann/comparator.git",
866 | "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9"
867 | },
868 | "dist": {
869 | "type": "zip",
870 | "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9",
871 | "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9",
872 | "shasum": ""
873 | },
874 | "require": {
875 | "php": "^7.0",
876 | "sebastian/diff": "^2.0 || ^3.0",
877 | "sebastian/exporter": "^3.1"
878 | },
879 | "require-dev": {
880 | "phpunit/phpunit": "^6.4"
881 | },
882 | "type": "library",
883 | "extra": {
884 | "branch-alias": {
885 | "dev-master": "2.1.x-dev"
886 | }
887 | },
888 | "autoload": {
889 | "classmap": [
890 | "src/"
891 | ]
892 | },
893 | "notification-url": "https://packagist.org/downloads/",
894 | "license": [
895 | "BSD-3-Clause"
896 | ],
897 | "authors": [
898 | {
899 | "name": "Jeff Welch",
900 | "email": "whatthejeff@gmail.com"
901 | },
902 | {
903 | "name": "Volker Dusch",
904 | "email": "github@wallbash.com"
905 | },
906 | {
907 | "name": "Bernhard Schussek",
908 | "email": "bschussek@2bepublished.at"
909 | },
910 | {
911 | "name": "Sebastian Bergmann",
912 | "email": "sebastian@phpunit.de"
913 | }
914 | ],
915 | "description": "Provides the functionality to compare PHP values for equality",
916 | "homepage": "https://github.com/sebastianbergmann/comparator",
917 | "keywords": [
918 | "comparator",
919 | "compare",
920 | "equality"
921 | ],
922 | "time": "2018-02-01T13:46:46+00:00"
923 | },
924 | {
925 | "name": "sebastian/diff",
926 | "version": "dev-master",
927 | "source": {
928 | "type": "git",
929 | "url": "https://github.com/sebastianbergmann/diff.git",
930 | "reference": "6906fbe33455221909eab31d4b8b1517b94aba46"
931 | },
932 | "dist": {
933 | "type": "zip",
934 | "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/6906fbe33455221909eab31d4b8b1517b94aba46",
935 | "reference": "6906fbe33455221909eab31d4b8b1517b94aba46",
936 | "shasum": ""
937 | },
938 | "require": {
939 | "php": "^7.1"
940 | },
941 | "require-dev": {
942 | "phpunit/phpunit": "^7.0",
943 | "symfony/process": "^2 || ^3.3 || ^4"
944 | },
945 | "type": "library",
946 | "extra": {
947 | "branch-alias": {
948 | "dev-master": "3.0-dev"
949 | }
950 | },
951 | "autoload": {
952 | "classmap": [
953 | "src/"
954 | ]
955 | },
956 | "notification-url": "https://packagist.org/downloads/",
957 | "license": [
958 | "BSD-3-Clause"
959 | ],
960 | "authors": [
961 | {
962 | "name": "Kore Nordmann",
963 | "email": "mail@kore-nordmann.de"
964 | },
965 | {
966 | "name": "Sebastian Bergmann",
967 | "email": "sebastian@phpunit.de"
968 | }
969 | ],
970 | "description": "Diff implementation",
971 | "homepage": "https://github.com/sebastianbergmann/diff",
972 | "keywords": [
973 | "diff",
974 | "udiff",
975 | "unidiff",
976 | "unified diff"
977 | ],
978 | "time": "2018-10-30T05:42:15+00:00"
979 | },
980 | {
981 | "name": "sebastian/environment",
982 | "version": "3.1.0",
983 | "source": {
984 | "type": "git",
985 | "url": "https://github.com/sebastianbergmann/environment.git",
986 | "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5"
987 | },
988 | "dist": {
989 | "type": "zip",
990 | "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
991 | "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
992 | "shasum": ""
993 | },
994 | "require": {
995 | "php": "^7.0"
996 | },
997 | "require-dev": {
998 | "phpunit/phpunit": "^6.1"
999 | },
1000 | "type": "library",
1001 | "extra": {
1002 | "branch-alias": {
1003 | "dev-master": "3.1.x-dev"
1004 | }
1005 | },
1006 | "autoload": {
1007 | "classmap": [
1008 | "src/"
1009 | ]
1010 | },
1011 | "notification-url": "https://packagist.org/downloads/",
1012 | "license": [
1013 | "BSD-3-Clause"
1014 | ],
1015 | "authors": [
1016 | {
1017 | "name": "Sebastian Bergmann",
1018 | "email": "sebastian@phpunit.de"
1019 | }
1020 | ],
1021 | "description": "Provides functionality to handle HHVM/PHP environments",
1022 | "homepage": "http://www.github.com/sebastianbergmann/environment",
1023 | "keywords": [
1024 | "Xdebug",
1025 | "environment",
1026 | "hhvm"
1027 | ],
1028 | "time": "2017-07-01T08:51:00+00:00"
1029 | },
1030 | {
1031 | "name": "sebastian/exporter",
1032 | "version": "dev-master",
1033 | "source": {
1034 | "type": "git",
1035 | "url": "https://github.com/sebastianbergmann/exporter.git",
1036 | "reference": "c8c4f196e32858e4448bc285e542b61a4c40d9dc"
1037 | },
1038 | "dist": {
1039 | "type": "zip",
1040 | "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c8c4f196e32858e4448bc285e542b61a4c40d9dc",
1041 | "reference": "c8c4f196e32858e4448bc285e542b61a4c40d9dc",
1042 | "shasum": ""
1043 | },
1044 | "require": {
1045 | "php": "^7.0",
1046 | "sebastian/recursion-context": "^3.0"
1047 | },
1048 | "require-dev": {
1049 | "ext-mbstring": "*",
1050 | "phpunit/phpunit": "^6.0"
1051 | },
1052 | "type": "library",
1053 | "extra": {
1054 | "branch-alias": {
1055 | "dev-master": "3.1.x-dev"
1056 | }
1057 | },
1058 | "autoload": {
1059 | "classmap": [
1060 | "src/"
1061 | ]
1062 | },
1063 | "notification-url": "https://packagist.org/downloads/",
1064 | "license": [
1065 | "BSD-3-Clause"
1066 | ],
1067 | "authors": [
1068 | {
1069 | "name": "Jeff Welch",
1070 | "email": "whatthejeff@gmail.com"
1071 | },
1072 | {
1073 | "name": "Volker Dusch",
1074 | "email": "github@wallbash.com"
1075 | },
1076 | {
1077 | "name": "Bernhard Schussek",
1078 | "email": "bschussek@2bepublished.at"
1079 | },
1080 | {
1081 | "name": "Sebastian Bergmann",
1082 | "email": "sebastian@phpunit.de"
1083 | },
1084 | {
1085 | "name": "Adam Harvey",
1086 | "email": "aharvey@php.net"
1087 | }
1088 | ],
1089 | "description": "Provides the functionality to export PHP variables for visualization",
1090 | "homepage": "http://www.github.com/sebastianbergmann/exporter",
1091 | "keywords": [
1092 | "export",
1093 | "exporter"
1094 | ],
1095 | "time": "2018-06-28T14:22:04+00:00"
1096 | },
1097 | {
1098 | "name": "sebastian/global-state",
1099 | "version": "dev-master",
1100 | "source": {
1101 | "type": "git",
1102 | "url": "https://github.com/sebastianbergmann/global-state.git",
1103 | "reference": "30367ea06c5cc3bf684457ac793fb2b863d783c6"
1104 | },
1105 | "dist": {
1106 | "type": "zip",
1107 | "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/30367ea06c5cc3bf684457ac793fb2b863d783c6",
1108 | "reference": "30367ea06c5cc3bf684457ac793fb2b863d783c6",
1109 | "shasum": ""
1110 | },
1111 | "require": {
1112 | "php": "^7.0"
1113 | },
1114 | "require-dev": {
1115 | "phpunit/phpunit": "^6.0"
1116 | },
1117 | "suggest": {
1118 | "ext-uopz": "*"
1119 | },
1120 | "type": "library",
1121 | "extra": {
1122 | "branch-alias": {
1123 | "dev-master": "2.0-dev"
1124 | }
1125 | },
1126 | "autoload": {
1127 | "classmap": [
1128 | "src/"
1129 | ]
1130 | },
1131 | "notification-url": "https://packagist.org/downloads/",
1132 | "license": [
1133 | "BSD-3-Clause"
1134 | ],
1135 | "authors": [
1136 | {
1137 | "name": "Sebastian Bergmann",
1138 | "email": "sebastian@phpunit.de"
1139 | }
1140 | ],
1141 | "description": "Snapshotting of global state",
1142 | "homepage": "http://www.github.com/sebastianbergmann/global-state",
1143 | "keywords": [
1144 | "global state"
1145 | ],
1146 | "time": "2018-05-15T05:52:33+00:00"
1147 | },
1148 | {
1149 | "name": "sebastian/object-enumerator",
1150 | "version": "dev-master",
1151 | "source": {
1152 | "type": "git",
1153 | "url": "https://github.com/sebastianbergmann/object-enumerator.git",
1154 | "reference": "e6be0a5481aff88f29262c331eab5b3ea939f55f"
1155 | },
1156 | "dist": {
1157 | "type": "zip",
1158 | "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e6be0a5481aff88f29262c331eab5b3ea939f55f",
1159 | "reference": "e6be0a5481aff88f29262c331eab5b3ea939f55f",
1160 | "shasum": ""
1161 | },
1162 | "require": {
1163 | "php": "^7.0",
1164 | "sebastian/object-reflector": "^1.1.1",
1165 | "sebastian/recursion-context": "^3.0"
1166 | },
1167 | "require-dev": {
1168 | "phpunit/phpunit": "^6.0"
1169 | },
1170 | "type": "library",
1171 | "extra": {
1172 | "branch-alias": {
1173 | "dev-master": "3.0.x-dev"
1174 | }
1175 | },
1176 | "autoload": {
1177 | "classmap": [
1178 | "src/"
1179 | ]
1180 | },
1181 | "notification-url": "https://packagist.org/downloads/",
1182 | "license": [
1183 | "BSD-3-Clause"
1184 | ],
1185 | "authors": [
1186 | {
1187 | "name": "Sebastian Bergmann",
1188 | "email": "sebastian@phpunit.de"
1189 | }
1190 | ],
1191 | "description": "Traverses array structures and object graphs to enumerate all referenced objects",
1192 | "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
1193 | "time": "2018-10-30T05:41:47+00:00"
1194 | },
1195 | {
1196 | "name": "sebastian/object-reflector",
1197 | "version": "dev-master",
1198 | "source": {
1199 | "type": "git",
1200 | "url": "https://github.com/sebastianbergmann/object-reflector.git",
1201 | "reference": "7707193304715e3caddf28fc73c02c12ed6f350c"
1202 | },
1203 | "dist": {
1204 | "type": "zip",
1205 | "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/7707193304715e3caddf28fc73c02c12ed6f350c",
1206 | "reference": "7707193304715e3caddf28fc73c02c12ed6f350c",
1207 | "shasum": ""
1208 | },
1209 | "require": {
1210 | "php": "^7.0"
1211 | },
1212 | "require-dev": {
1213 | "phpunit/phpunit": "^6.0"
1214 | },
1215 | "type": "library",
1216 | "extra": {
1217 | "branch-alias": {
1218 | "dev-master": "1.1-dev"
1219 | }
1220 | },
1221 | "autoload": {
1222 | "classmap": [
1223 | "src/"
1224 | ]
1225 | },
1226 | "notification-url": "https://packagist.org/downloads/",
1227 | "license": [
1228 | "BSD-3-Clause"
1229 | ],
1230 | "authors": [
1231 | {
1232 | "name": "Sebastian Bergmann",
1233 | "email": "sebastian@phpunit.de"
1234 | }
1235 | ],
1236 | "description": "Allows reflection of object attributes, including inherited and non-public ones",
1237 | "homepage": "https://github.com/sebastianbergmann/object-reflector/",
1238 | "time": "2018-05-15T05:50:44+00:00"
1239 | },
1240 | {
1241 | "name": "sebastian/recursion-context",
1242 | "version": "dev-master",
1243 | "source": {
1244 | "type": "git",
1245 | "url": "https://github.com/sebastianbergmann/recursion-context.git",
1246 | "reference": "dbe1869c13935c6080c834fc61424834b9ad5907"
1247 | },
1248 | "dist": {
1249 | "type": "zip",
1250 | "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/dbe1869c13935c6080c834fc61424834b9ad5907",
1251 | "reference": "dbe1869c13935c6080c834fc61424834b9ad5907",
1252 | "shasum": ""
1253 | },
1254 | "require": {
1255 | "php": "^7.0"
1256 | },
1257 | "require-dev": {
1258 | "phpunit/phpunit": "^6.0"
1259 | },
1260 | "type": "library",
1261 | "extra": {
1262 | "branch-alias": {
1263 | "dev-master": "3.0.x-dev"
1264 | }
1265 | },
1266 | "autoload": {
1267 | "classmap": [
1268 | "src/"
1269 | ]
1270 | },
1271 | "notification-url": "https://packagist.org/downloads/",
1272 | "license": [
1273 | "BSD-3-Clause"
1274 | ],
1275 | "authors": [
1276 | {
1277 | "name": "Jeff Welch",
1278 | "email": "whatthejeff@gmail.com"
1279 | },
1280 | {
1281 | "name": "Sebastian Bergmann",
1282 | "email": "sebastian@phpunit.de"
1283 | },
1284 | {
1285 | "name": "Adam Harvey",
1286 | "email": "aharvey@php.net"
1287 | }
1288 | ],
1289 | "description": "Provides functionality to recursively process PHP variables",
1290 | "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
1291 | "time": "2018-05-15T05:52:05+00:00"
1292 | },
1293 | {
1294 | "name": "sebastian/resource-operations",
1295 | "version": "1.0.0",
1296 | "source": {
1297 | "type": "git",
1298 | "url": "https://github.com/sebastianbergmann/resource-operations.git",
1299 | "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52"
1300 | },
1301 | "dist": {
1302 | "type": "zip",
1303 | "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
1304 | "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52",
1305 | "shasum": ""
1306 | },
1307 | "require": {
1308 | "php": ">=5.6.0"
1309 | },
1310 | "type": "library",
1311 | "extra": {
1312 | "branch-alias": {
1313 | "dev-master": "1.0.x-dev"
1314 | }
1315 | },
1316 | "autoload": {
1317 | "classmap": [
1318 | "src/"
1319 | ]
1320 | },
1321 | "notification-url": "https://packagist.org/downloads/",
1322 | "license": [
1323 | "BSD-3-Clause"
1324 | ],
1325 | "authors": [
1326 | {
1327 | "name": "Sebastian Bergmann",
1328 | "email": "sebastian@phpunit.de"
1329 | }
1330 | ],
1331 | "description": "Provides a list of PHP built-in functions that operate on resources",
1332 | "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
1333 | "time": "2015-07-28T20:34:47+00:00"
1334 | },
1335 | {
1336 | "name": "sebastian/version",
1337 | "version": "2.0.1",
1338 | "source": {
1339 | "type": "git",
1340 | "url": "https://github.com/sebastianbergmann/version.git",
1341 | "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
1342 | },
1343 | "dist": {
1344 | "type": "zip",
1345 | "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
1346 | "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
1347 | "shasum": ""
1348 | },
1349 | "require": {
1350 | "php": ">=5.6"
1351 | },
1352 | "type": "library",
1353 | "extra": {
1354 | "branch-alias": {
1355 | "dev-master": "2.0.x-dev"
1356 | }
1357 | },
1358 | "autoload": {
1359 | "classmap": [
1360 | "src/"
1361 | ]
1362 | },
1363 | "notification-url": "https://packagist.org/downloads/",
1364 | "license": [
1365 | "BSD-3-Clause"
1366 | ],
1367 | "authors": [
1368 | {
1369 | "name": "Sebastian Bergmann",
1370 | "email": "sebastian@phpunit.de",
1371 | "role": "lead"
1372 | }
1373 | ],
1374 | "description": "Library that helps with managing the version number of Git-hosted PHP projects",
1375 | "homepage": "https://github.com/sebastianbergmann/version",
1376 | "time": "2016-10-03T07:35:21+00:00"
1377 | },
1378 | {
1379 | "name": "theseer/tokenizer",
1380 | "version": "1.1.0",
1381 | "source": {
1382 | "type": "git",
1383 | "url": "https://github.com/theseer/tokenizer.git",
1384 | "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b"
1385 | },
1386 | "dist": {
1387 | "type": "zip",
1388 | "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b",
1389 | "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b",
1390 | "shasum": ""
1391 | },
1392 | "require": {
1393 | "ext-dom": "*",
1394 | "ext-tokenizer": "*",
1395 | "ext-xmlwriter": "*",
1396 | "php": "^7.0"
1397 | },
1398 | "type": "library",
1399 | "autoload": {
1400 | "classmap": [
1401 | "src/"
1402 | ]
1403 | },
1404 | "notification-url": "https://packagist.org/downloads/",
1405 | "license": [
1406 | "BSD-3-Clause"
1407 | ],
1408 | "authors": [
1409 | {
1410 | "name": "Arne Blankerts",
1411 | "email": "arne@blankerts.de",
1412 | "role": "Developer"
1413 | }
1414 | ],
1415 | "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
1416 | "time": "2017-04-07T12:08:54+00:00"
1417 | },
1418 | {
1419 | "name": "webmozart/assert",
1420 | "version": "dev-master",
1421 | "source": {
1422 | "type": "git",
1423 | "url": "https://github.com/webmozart/assert.git",
1424 | "reference": "53927dddf3afa2088b355188e143bba42159bf5d"
1425 | },
1426 | "dist": {
1427 | "type": "zip",
1428 | "url": "https://api.github.com/repos/webmozart/assert/zipball/53927dddf3afa2088b355188e143bba42159bf5d",
1429 | "reference": "53927dddf3afa2088b355188e143bba42159bf5d",
1430 | "shasum": ""
1431 | },
1432 | "require": {
1433 | "php": "^5.3.3 || ^7.0"
1434 | },
1435 | "require-dev": {
1436 | "phpunit/phpunit": "^4.6",
1437 | "sebastian/version": "^1.0.1"
1438 | },
1439 | "type": "library",
1440 | "extra": {
1441 | "branch-alias": {
1442 | "dev-master": "1.3-dev"
1443 | }
1444 | },
1445 | "autoload": {
1446 | "psr-4": {
1447 | "Webmozart\\Assert\\": "src/"
1448 | }
1449 | },
1450 | "notification-url": "https://packagist.org/downloads/",
1451 | "license": [
1452 | "MIT"
1453 | ],
1454 | "authors": [
1455 | {
1456 | "name": "Bernhard Schussek",
1457 | "email": "bschussek@gmail.com"
1458 | }
1459 | ],
1460 | "description": "Assertions to validate method input/output with nice error messages.",
1461 | "keywords": [
1462 | "assert",
1463 | "check",
1464 | "validate"
1465 | ],
1466 | "time": "2018-05-29T14:25:02+00:00"
1467 | }
1468 | ],
1469 | "aliases": [],
1470 | "minimum-stability": "dev",
1471 | "stability-flags": [],
1472 | "prefer-stable": false,
1473 | "prefer-lowest": false,
1474 | "platform": [],
1475 | "platform-dev": []
1476 | }
1477 |
--------------------------------------------------------------------------------