__toString() public method

String representation of this collection
public __toString ( ) : string
return string Returns the full name of this collection.
Esempio n. 1
0
 public function deleteRows($where)
 {
     if (!is_object($where)) {
         if (is_string($where)) {
             $where = array($where);
         }
         $select = $this->select($where);
     } else {
         $select = $where;
     }
     $profiler = Kwf_Registry::get('db')->getProfiler();
     $p = $profiler->queryStart($this->_collection->__toString() . "\n" . Zend_Json::encode($this->_getQuery($select)));
     $ret = $this->_collection->remove($this->_getQuery($select), array('safe' => true, 'multiple' => false));
     $p = $profiler->queryEnd($p);
     if (!$ret || !$ret['ok']) {
         throw new Kwf_Exception("delete failed");
     }
 }
Esempio n. 2
0
 /**
  * Wrapper method for MongoCollection::__toString().
  *
  * @see http://www.php.net/manual/en/mongocollection.--tostring.php
  * @return string
  */
 public function __toString()
 {
     return $this->mongoCollection->__toString();
 }