Ejemplo n.º 1
0
 public function filter($field)
 {
     if ($this->_has_upload) {
         $value = $this->getValue($field);
         $file = $value[0];
         $pathinfo = pathinfo($file['name']);
         $name = Uri::format($pathinfo['filename']) . '.' . $pathinfo['extension'];
         $this->_table->{$field} = "{$this->_path}/{$name}";
         $this->_mf->addFile($file['tmp_name'], $this->_table->{$field});
     }
     $this->deleteUploadFolder($field);
 }
Ejemplo n.º 2
0
 public function filter($field)
 {
     $title = $this->getValue($this->_title);
     $uri = $this->getValue($field);
     $this->_id = substr($this->_id, 0, 4);
     $uri = $uri == '' ? Uri::format($title) : Uri::format($uri);
     $uri = LimitChars::filter($uri, 80, '');
     if ($this->_prefix != '') {
         if ($this->_format_prefix) {
             $this->_prefix = '/' . Uri::format($this->_prefix);
         } else {
             $this->_prefix = '/' . $this->_prefix;
         }
     }
     if ($this->_id != '') {
         $this->_table->uri = "{$this->_prefix}/{$uri}-{$this->_id}/";
     } else {
         $this->_table->uri = "{$this->_prefix}/{$uri}/";
     }
 }
Ejemplo n.º 3
0
 public function filter($field)
 {
     $value = (string) $this->getValue($this->_from_field);
     $this->_table->{$field} = Uri::format($value, $this->_slug);
 }