-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added construct to AbstractAdapter with basePath, Added exception, Added INI, STR, XML parse. Fixed unused variable in mime method
- Loading branch information
Showing
9 changed files
with
59 additions
and
63 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 |
---|---|---|
@@ -1,29 +1,17 @@ | ||
<?php | ||
|
||
/** | ||
* Aurora - Framework | ||
* | ||
* Aurora is fast, simple, extensible Framework | ||
* | ||
* PHP version 6 | ||
* | ||
* @category Framework | ||
* @package Aurora | ||
* @author VeeeneX <[email protected]> | ||
* @copyright 2015 Caroon | ||
* @license MIT | ||
* @version 0.1.2 | ||
* @link http://caroon.com/Aurora | ||
* | ||
*/ | ||
|
||
namespace Aurora; | ||
|
||
class AbstractAdapter implements AdapterInterface | ||
{ | ||
public $basePath; | ||
public $extension; | ||
|
||
public function __construct($basePath) | ||
{ | ||
$this->basePath = $basePath; | ||
} | ||
|
||
public function setBasePath($basePath) | ||
{ | ||
$this->basePath = $basePath; | ||
|
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,7 @@ | ||
<?php | ||
|
||
namespace Aurora\Adapter\Exception; | ||
|
||
use Exception; | ||
|
||
class UnableToParseFormatException extends Exception {} |
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,14 @@ | ||
<?php | ||
namespace Aurora\Adapter; | ||
|
||
use Aurora\AbstractAdapter; | ||
|
||
class INI extends AbstractAdapter | ||
{ | ||
public $extension = ".ini"; | ||
|
||
public function parse($data) | ||
{ | ||
return parse_ini_string($data); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,22 +1,4 @@ | ||
<?php | ||
|
||
/** | ||
* Aurora - Framework | ||
* | ||
* Aurora is fast, simple, extensible Framework | ||
* | ||
* PHP version 6 | ||
* | ||
* @category Framework | ||
* @package Aurora | ||
* @author VeeeneX <[email protected]> | ||
* @copyright 2015 Caroon | ||
* @license MIT | ||
* @version 0.1.2 | ||
* @link http://caroon.com/Aurora | ||
* | ||
*/ | ||
|
||
namespace Aurora\Adapter; | ||
|
||
use Aurora\AbstractAdapter; | ||
|
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 |
---|---|---|
@@ -1,26 +1,9 @@ | ||
<?php | ||
|
||
/** | ||
* Aurora - Framework | ||
* | ||
* Aurora is fast, simple, extensible Framework | ||
* | ||
* PHP version 6 | ||
* | ||
* @category Framework | ||
* @package Aurora | ||
* @author VeeeneX <[email protected]> | ||
* @copyright 2015 Caroon | ||
* @license MIT | ||
* @version 0.1.2 | ||
* @link http://caroon.com/Aurora | ||
* | ||
*/ | ||
|
||
namespace Aurora\Adapter; | ||
|
||
use Aurora\AbstractAdapter; | ||
use Aurora\Exception\UnableToParseFormatException; | ||
use Aurora\Adapter\Exception\UnableToParseFormatException; | ||
|
||
class PHP extends AbstractAdapter | ||
{ | ||
|
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,14 @@ | ||
<?php | ||
namespace Aurora\Adapter; | ||
|
||
use Aurora\AbstractAdapter; | ||
|
||
class STR extends AbstractAdapter | ||
{ | ||
public $extension = ".str"; | ||
|
||
public function parse($data) | ||
{ | ||
return parse_str($data); | ||
} | ||
} |
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,17 @@ | ||
<?php | ||
namespace Aurora\Adapter; | ||
|
||
use Aurora\AbstractAdapter; | ||
|
||
class XML extends AbstractAdapter | ||
{ | ||
public $extension = ".xml"; | ||
|
||
public function parse($data) | ||
{ | ||
$p = xml_parser_create(); | ||
xml_parse_into_struct($p, $data, $vals, $index); | ||
xml_parser_free($p); | ||
return $vals; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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