45 lines
894 B
PHP
45 lines
894 B
PHP
<?php
|
|
class Scontainer implements \ArrayAccess
|
|
{
|
|
|
|
static public function updateByFrontEditor( $scontainer_id, $content, $lang_id )
|
|
{
|
|
global $mdb;
|
|
return $mdb -> update( 'pp_scontainers_langs', [
|
|
'text' => $content
|
|
], [
|
|
'AND' => [ 'container_id' => $scontainer_id, 'lang_id' => $lang_id ]
|
|
] );
|
|
}
|
|
|
|
public function __get( $variable )
|
|
{
|
|
if ( array_key_exists( $variable, $this -> data ) )
|
|
return $this -> $variable;
|
|
}
|
|
|
|
public function __set( $variable, $value )
|
|
{
|
|
$this -> $variable = $value;
|
|
}
|
|
|
|
public function offsetExists( $offset )
|
|
{
|
|
return isset( $this -> $offset );
|
|
}
|
|
|
|
public function offsetGet( $offset )
|
|
{
|
|
return $this -> $offset;
|
|
}
|
|
|
|
public function offsetSet( $offset, $value )
|
|
{
|
|
$this -> $offset = $value;
|
|
}
|
|
|
|
public function offsetUnset( $offset )
|
|
{
|
|
unset( $this -> $offset );
|
|
}
|
|
} |