56 $this->CachedMultyFS =
get_package(
'cached_multy_fs' ,
'last' , __FILE__ );
57 $this->Security =
get_package(
'security' ,
'last' , __FILE__ );
58 $this->SecurityParser =
get_package(
'security::security_parser' ,
'last' , __FILE__ );
100 if( $this->AddCondition ===
false )
102 $this->AddCondition = $theAddCondition;
106 throw(
new Exception(
'"AddCondition" was already set' ) );
109 catch( Exception $e )
141 $id = $this->Security->get( $id ,
'string' );
143 $id = explode(
',' , $id );
147 foreach( $id as $k => $v )
149 $Return [] = array(
'content' => $this->Security->get( $this->get_content( $v ) ,
'string' ) );
154 catch( Exception $e )
186 $id = $this->Security->get( $id ,
'string' );
187 $id = explode(
',' , $id );
189 $Record = $this->SecurityParser->parse_parameters( $Record ,
'content:string' ,
'allow_not_set' );
190 $Template =
get_field( $Record ,
'content' );
191 $Template = $this->Security->get( $Template ,
'unsafe_string' );
193 foreach( $id as $k => $v )
195 $this->CachedMultyFS->file_put_contents( $this->
get_content_path( $v ) , $Template );
198 catch( Exception $e )
232 if( $this->AddCondition !==
false )
234 $Path = $this->CachedMultyFS->get_file_path( $VirtualPath.
"_$this->AddCondition" ,
false );
237 if( $Path ===
false )
239 $Path = $this->CachedMultyFS->get_file_path( $VirtualPath ,
false );
244 catch( Exception $e )
276 $VirtualPath = dirname( __FILE__ ).
"/res/templates/$Template";
285 catch( Exception $e )
319 if( $Path !==
false && $this->CachedMultyFS->file_exists( $Path ) )
321 return( $this->CachedMultyFS->file_get_contents( $Path ) );
325 throw(
new Exception(
"The content \"$Template\" was not found. Path : $Path" ) );
328 catch( Exception $e )
368 $PackageName = $this->Security->get( $PackageName ,
'string' );
369 $PackageVersion = $this->Security->get( $PackageVersion ,
'string' );
370 $Template = $this->Security->get( $Template ,
'string' );
374 return( $this->CachedMultyFS->file_get_contents( $Path ) );
376 catch( Exception $e )
408 $PackageName = $Options->get_setting(
'package_name' ,
false );
409 $PackageVersion = $Options->get_setting(
'package_version' ,
'last' );
410 $FileName = $Options->get_setting(
'template' ,
false );
414 catch( Exception $e )
446 $PackageName = $Options->get_setting(
'package_name' ,
false );
448 if( $PackageName ===
false )
450 return( $this->
get_content( $Options->get_setting(
'template' ) ) );
457 catch( Exception $e )