PHP Classes
elePHPant
Icontem

File: example/PropelSchemaXml/configuration.php

Recommend this page to a friend!
  Classes of nvb  >  PHP Service Locator Generator  >  example/PropelSchemaXml/configuration.php  >  Download  
File: example/PropelSchemaXml/configuration.php
Role: Configuration script
Content type: text/plain
Description: Example script
Class: PHP Service Locator Generator
Generate locator classes from configuration files
Author: By
Last change: implemented creation if directory does not exist
added support for configuration property "create_interface" into
FromPropelSchemaXmlAssembler
Date: 3 years ago
Size: 1,841 bytes
 

 

Contents

Class file image Download
<?php
/**
 * @author stev leibelt <artodeto@bazzline.net>
 * @since 2014-04-27
 */

return array(
   
'assembler' => '\Net\Bazzline\Component\Locator\Configuration\Assembler\FromPropelSchemaXmlAssembler',
   
'class_name' => 'FromPropelSchemaXmlLocator', //determines file name as well as php class name
   
'create_interface' => true, //create interface for locator generator
    //add class names here, depending on entries in use section, full qualified or not
   
'extends' => 'BaseLocator',
   
'file_exists_strategy' => '\Net\Bazzline\Component\Locator\FileExistsStrategy\SuffixWithCurrentTimestampStrategy',
   
//file path where files will be generated
   
'file_path' => __DIR__ . '/../../data/PropelSchemaXml',
   
//add interface names here, depending on entries in use section, full qualified or not
   
'implements' => array(
       
'\My\Full\QualifiedInterface',
       
'MyInterface'
   
),
   
//method builder that is used for normal propel class instantiation
   
'column_class_method_body_builder' => '\Net\Bazzline\Component\Locator\MethodBodyBuilder\NewInstanceBuilder',
   
//method builder that is used for query propel class instantiation
   
'query_class_method_body_builder' => '\Net\Bazzline\Component\Locator\MethodBodyBuilder\PropelQueryCreateBuilder',
   
//prefix for the instance fetching
   
'method_prefix' => 'create',
   
'namespace' => 'Application\Service',
   
'path_to_schema_xml' => __DIR__ . '/schema.xml',
   
//add use statements here
    //format: array(['alias' => <string>], 'class_name' => <string>)
   
'uses' => array(
        array(
           
'alias' => 'MyInterface',
           
'class_name' => 'My\OtherInterface'
       
),
        array(
           
'alias' => 'BaseLocator',
           
'class_name' => 'Application\Locator\BaseLocator'
       
)
    )
);