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
<?php | |
namespace FiremonPHP\Database; | |
final class Connection implements ConnectionInterface | |
{ | |
/** | |
* @var string | |
*/ | |
private $_alias; |
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
{ | |
"name": "FiremonPHP/database", | |
"description": "This lib provides easy way to read and write data on mongodb!", | |
"minimum-stability": "dev", | |
"license": ["LGPLv3+", "GPLv3+", "MIT"], | |
"authors": [ | |
{ | |
"name": "Marcos Dantas", | |
"email": "marcos.adantas@hotmail.com" | |
} |
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
<?php | |
namespace FiremonPHP\Database\Query; | |
class ReadQuery implements QueryInterface | |
{ | |
/** | |
* @var \FiremonPHP\Database\Connection\ConnectionInterface | |
*/ | |
private $_connection; |
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
<?php | |
namespace FiremonPHP\Database\Connection; | |
final class Connection implements ConnectionInterface | |
{ | |
/** | |
* @var string | |
*/ | |
private $_alias; |
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
<?php | |
$database = new FiremonPHP\Database\Database(); | |
$newPosts = $database->set([ | |
'users' => [ | |
['nome' => 'Marcos Dantas', 'cidade' => 'Parelhas'] // Inserção de muitos registros | |
//... | |
], |
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
<?php | |
namespace FiremonPHP\Database\Operations; | |
class WriteOperation | |
{ | |
private $_data = []; | |
/** | |
* @var \MongoDB\Driver\BulkWrite[] |
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
<?php | |
namespace FiremonPHP\Manager; | |
use MongoDB\Driver\BulkWrite; | |
use MongoDB\Driver\Cursor; | |
use MongoDB\Driver\Query; | |
use MongoDB\Driver\WriteResult; | |
class Manager | |
{ |
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
<?php | |
require __DIR__.'/vendor/autoload.php'; | |
\FiremonPHP\Manager\Connection\Configuration::set('default', [ | |
'url' => 'mongodb://localhost:27017', | |
'database' => 'testdb' | |
]); | |
$manager = \FiremonPHP\Manager\Connection\Configuration::get(); |
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
<?php | |
namespace FiremonPHP\Manager; | |
use FiremonPHP\Manager\Expression\ConditionsExpression; | |
use MongoDB\Driver\BulkWrite; | |
use MongoDB\Driver\Cursor; | |
use MongoDB\Driver\Query; | |
use MongoDB\Driver\WriteResult; | |
class Manager |
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
<?php | |
namespace FiremonPHP\Storage; | |
class FileStorage | |
{ | |
private $files = []; | |
public function __construct(array $files) | |
{ | |
$this->storeInternal($files); |
OlderNewer