ProtectedFile::beforeValidate PHP Method

beforeValidate() public method

(non-PHPdoc)
See also: BaseActiveRecord::beforeSave()
public beforeValidate ( )
    public function beforeValidate()
    {
        if (!$this->_source_path) {
            // the file should be in place
            $path = $this->getPath();
            if (!$this->mimetype) {
                $this->mimetype = $this->lookupMimetype($path);
            }
            if (!$this->size) {
                $this->size = filesize($path);
            }
        }
        return parent::beforeValidate();
    }