56 $this->GraphDataAccess =
get_package(
'graph::graph_data::graph_data_access' ,
'last' , __FILE__ );
57 $this->Security =
get_package(
'security' ,
'last' , __FILE__ );
58 $this->SecurityParser =
get_package(
'security::security_parser' ,
'last' , __FILE__ );
96 $UserId = $this->Security->get( $UserId ,
'integer' );
97 $GraphType = $this->Security->get( $GraphType ,
'integer' );
99 $Records = $this->GraphDataAccess->unsafe_select(
100 "author = $UserId AND graph_type = $GraphType" ,
101 "MIN( abscissa ) AS `from` , MAX( abscissa ) AS `to`"
104 if( isset( $Records[ 0 ] ) ===
false ||
get_field( $Records[ 0 ] ,
'from' ) == null )
110 array(
'from' =>
get_field( $Records[ 0 ] ,
'from' ) ,
'to' =>
get_field( $Records[ 0 ] ,
'to' ) )
113 catch( Exception $e )
157 $UserId = $this->Security->get( $UserId ,
'integer' );
158 $GraphType = $this->Security->get( $GraphType ,
'integer' );
159 $AbscissaFrom = $this->Security->get( $AbscissaFrom ,
'integer' );
160 $AbscissaTo = $this->Security->get( $AbscissaTo ,
'integer' );
162 $Records = $this->GraphDataAccess->unsafe_select(
163 "author = $UserId AND graph_type = $GraphType ".
164 "AND abscissa >= $AbscissaFrom AND abscissa <= $AbscissaTo ORDER BY abscissa ASC"
169 catch( Exception $e )
209 foreach( $DataY as $i => $Y )
211 if( $Y == $Ordinatus )
213 return( $DataX[ $i ] );
217 throw(
new Exception(
'Abscissa was not found' ) );
219 catch( Exception $e )