ice framework documentation ice doc v1.10.1
Methods
  • getId() : void
  • getType() : void
  • getClient() : void
  • getLastInsertId() : void
  • __construct(string $dsn, string $dbname, array $options) : void
    Instantiate mongo connection.
  • getIdValue(string $id) : object
    Get the id value.
  • getDateTime(variable $value, variable $model) : void
    Get a date time object.
  • findOne(string $from, variable $filters, array $options, array $fields) : void
    Find one document that match criteria.
  • find(string $from, variable $filters, array $options, array $fields) : void
    Find all documents that match criteria.
  • count(string $from, variable $filters) : int
    Count rows that match criteria.
  • select(string $from, variable $filters, array $options, array $fields) : void
    SELECT document(s) that match criteria.
  • insert(string $from, array $fields) : void
    INSERT document into collection.
  • update(string $from, variable $filters, array $fields) : void
    UPDATE documents in the collection.
  • delete(string $from, variable $filters) : void
    Remove documents from the collection.
  • getError() : void
    Get an error message.
Methods Details
  • public function getId()

  • public function getType()

  • public function getClient()

  • public function getLastInsertId()

  • public function __construct(string $dsn, string $dbname, array $options)

    Instantiate mongo connection.
  • public function getIdValue(string $id)

    Get the id value.
  • public function getDateTime(variable $value, variable $model)

    Get a date time object.
  • public function findOne(string $from, variable $filters, array $options, array $fields)

    Find one document that match criteria.
  • public function find(string $from, variable $filters, array $options, array $fields)

    Find all documents that match criteria.
    
          $db->find("users", array("a" => 1, "b" => "q"));
          $db->find("users", array("age" => array(">" => 33)));
          $db->find("users", array("OR" => array(array("a" => 1), array("b" => 2))));
         
  • public function count(string $from, variable $filters)

    Count rows that match criteria.
    
          $db->count("users", ["a" => 1]);
         
  • public function select(string $from, variable $filters, array $options, array $fields)

    SELECT document(s) that match criteria.
  • public function insert(string $from, array $fields)

    INSERT document into collection.
  • public function update(string $from, variable $filters, array $fields)

    UPDATE documents in the collection.
  • public function delete(string $from, variable $filters)

    Remove documents from the collection.
  • public function getError()

    Get an error message.