Beispiel #1
0
 public function quote($string)
 {
     if ($this->_left instanceof modelField) {
         $collection = $this->_left->getCollection();
         return $collection->getStorage()->quote($string);
     }
     throw new Exception('left is ' . get_class($this->_left));
 }
Beispiel #2
0
 public function getCollection()
 {
     return $this->_argument->getCollection();
 }
Beispiel #3
0
 /**
  *
  * @param modelField $field
  */
 protected function _fixJoinField(&$field)
 {
     $collection = modelCollection::getInstanceById($field->getCollectionId());
     $foreignKeys = $collection->getForeignKeys();
     $fieldName = $field->getName();
     if (isset($foreignKeys[$fieldName])) {
         foreach ($foreignKeys[$fieldName] as $foreignModel => $foreignKey) {
             foreach ($this->_joinedTables as $table) {
                 /** modelCollection $table */
                 if ($foreignModel == $table->getModelClass()) {
                     $field = $table->{$foreignKey};
                     return;
                 }
             }
         }
     }
 }