예제 #1
0
 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);
 }
예제 #2
0
 /**
  * Make an integer to be stored in a file
  * @param int $n
  */
 public function __construct($n = 0)
 {
     parent::__construct(4);
     $this->set($n);
 }
예제 #3
0
 /**
  * Constructor
  */
 public function __construct($path = null, $mode = 'w+')
 {
     $filename = null !== $path ? $path : self::$path . '/' . StringUtils::randString(self::$filenameLength);
     parent::__construct($filename, $mode);
 }
예제 #4
0
 function __construct(&$string)
 {
     $this->file = tempnam($_ENV['storageFolder'], 'stringFile.');
     file_put_contents($this->file, $string);
     parent::__construct($this->file);
 }