public function __set($k, $v) { if (!$v instanceof Permission) { return; } return parent::__set($k, $v); }
public function __set($k, $v) { if (!$v instanceof Scratchpad) { return NULL; } return parent::__set($k, $v); }
public function __set($k, $v) { if (!$v instanceof User) { return NULL; } return parent::__set($k, $v); }
public function __construct( $words = NULL ){ parent::__set($word, $id ); }
public function __set($k, $v) { switch ($k) { case 'session_id': $v = intval($v); if ($v < 1) { return NULL; } break; case 'token': $v = strval($v); if (!preg_match('#^[a-z0-9]{32}$#', $v)) { return NULL; } break; case 'created': if (preg_match("#^[0-9]+\$#", $v)) { $v = date('Y/m/d H:i:s', $v); } $v = strtotime($v); if (!$v) { return NULL; } case 'modified': if (preg_match("#^[0-9]+\$#", $v)) { $v = date('Y/m/d H:i:s', $v); } $v = strtotime($v); if (!$v) { return NULL; } default: if (!preg_match('#[a-z][a-z0-9_]+$#', $k)) { return NULL; } $v = substr(strval($v), 0, 500); break; } return parent::__set($k, $v); }
public function __set( $k, $v ){ $k = $this->normalizePath( $k ); if( ! $k ) return; $actions = array(); if( ! is_array($v) && ! $v instanceof iterator ) return array(); foreach( $v as $a ){ $a = $this->normalizeAction($a); $actions[] = $a; } if( count( $actions ) < 1 ) { $this->__unset( $this->normalizePath($k) ); return; } return parent::__set( $this->normalizePath($k), $actions); }
public function __set($k, $v) { $v = trim(substr(strval($v), 0, 500)); switch ($k) { case 'user_id': if (!$this->isUserId($v)) { return NULL; } $v = intval($v); break; case 'nickname': if (!$this->isNickname($v)) { return NULL; } break; case 'email': if (!$this->isEmail($v)) { return NULL; } break; case 'passhash': if (!$this->isPassHash($v)) { return NULL; } break; case 'created': if (preg_match("#^[0-9]+\$#", $v)) { $v = date('Y/m/d H:i:s', $v); } $v = strtotime($v); if (!$v) { return NULL; } case 'modified': if (preg_match("#^[0-9]+\$#", $v)) { $v = date('Y/m/d H:i:s', $v); } $v = strtotime($v); if (!$v) { return NULL; } default: if (!preg_match('#[a-z][a-z0-9_]+$#', $k)) { return NULL; } break; } return parent::__set($k, $v); }
public function __set($k, $v) { switch ($k) { case 'pad': if (!$v instanceof Scratchpad) { return NULL; } break; case 'comment': if (!$v instanceof Scratchpad) { return NULL; } break; case 'request': if (!$v instanceof GLU) { return NULL; } break; case 'server': if (!$v instanceof GLU) { return NULL; } break; case 'session': if (!$v instanceof Session) { return NULL; } break; case 'user': if (!$v instanceof User) { return NULL; } break; case 'author': if (!$v instanceof User) { return NULL; } break; case 'permission': if (!$v instanceof Permission) { return NULL; } break; case 'NEW': if (!$v instanceof Instantiator) { return NULL; } break; case 'headers': if (!$v instanceof GLU) { return NULL; } break; case 'dir': if (!$v instanceof Dir) { return NULL; } break; case 'list': if (!$v instanceof GLU) { return NULL; } break; case 'path': $v = '/' . trim(preg_replace('/[^a-z0-9\\/\\_\\-\\.]/', '', strval($v)), ' /'); break; case 'route': $v = preg_replace('/[^a-z0-9_\\-]/', '', strval($v)); break; case 'baseurl': $v = preg_replace('/[^a-z0-9\\/\\_\\-\\.]/i', '', strval($v)); break; case 'selfurl': $v = preg_replace('/[^a-z0-9\\/\\_\\-\\.]/i', '', strval($v)); break; case 'title': $v = preg_replace('/[^a-z0-9_\\-\\. ]/i', '', strval($v)); break; case 'START_TIME': if (!is_numeric($v)) { return NULL; } break; //default: print '<pre>' . $k . '</pre>'; } return parent::__set($k, $v); }
public function __set($k, $v) { switch ($k) { case 'dir_id': $v = intval($v); if ($v < 1) { return NULL; } break; case 'path': $v = '/' . trim(strval($v), ' /-_'); if (!preg_match('#^[\\/]?[a-z0-9\\/\\_\\-\\.]+$#i', $v)) { return NULL; } break; case 'parent': $v = intval($v); if ($v < 0) { return NULL; } break; case 'entry_id': $v = intval($v); if ($v < 1) { return NULL; } break; case 'entry_type': $v = intval($v); if ($v < 0) { return NULL; } break; case 'author': $v = intval($v); if ($v < 1) { return NULL; } break; case 'created': $v = strval($v); if (preg_match("/^[0-9]+\$/", $v)) { $v = date('Y/m/d H:i:s', $v); } $v = strtotime($v); if (!$v) { return NULL; } break; case 'body': $v = strval($v); break; default: if (!preg_match('#[a-z][a-z0-9_]+$#', $k)) { return NULL; } break; } return parent::__set($k, $v); }