function __construct($meta = array(), array $options = array()) { if (!is_array($meta) && is_numeric($meta)) { $meta = array('id' => $meta); } $meta['table'] = 'documents'; $meta['name'] = 'Document'; $meta['fields'] = array('id' => 'primarykey', 'name' => 'string', 'active' => 'boolean', 'modified' => 'lastmodified', 'added' => 'dateadded'); return parent::__construct($meta, $options); }
/** * Make an integer to be stored in a file * @param int $n */ public function __construct($n = 0) { parent::__construct(4); $this->set($n); }
/** * Constructor */ public function __construct($path = null, $mode = 'w+') { $filename = null !== $path ? $path : self::$path . '/' . StringUtils::randString(self::$filenameLength); parent::__construct($filename, $mode); }
function __construct(&$string) { $this->file = tempnam($_ENV['storageFolder'], 'stringFile.'); file_put_contents($this->file, $string); parent::__construct($this->file); }