Static Public Member Functions | |
| static | getArrayField (array $arrElement, $mixKey, $mixNotFound=null) |
Definition at line 11 of file CorujaArrayManipulation.class.php.
| static getArrayField | ( | array $ | arrElement, | |
| $ | mixKey, | |||
| $ | mixNotFound = null | |||
| ) | [static] |
Returns the value of $mixKey key of $arrElement array or $mixNotFound in case the key doesn't exist
| Array | $arrElement Array under manipulation | |
| unknown | $mixKey Key of desired value | |
| unknown | $mixNotFound Value returned in case the key was not found |
\1
true
Definition at line 30 of file CorujaArrayManipulation.class.php.
Referenced by CorujaDebug::getBackTraceCaller(), CodeReflectionFile::getFileBit(), CorujaClassManipulation::getNamespaceFromClassDefinition(), CorujaArrayManipulationTest::testGetArrayFieldWithExistingKey(), CorujaArrayManipulationTest::testGetArrayFieldWithNoKey(), CorujaArrayManipulationTest::testGetArrayFieldWithNoneArray(), CorujaArrayManipulationTest::testGetArrayFieldWithNoneExistingKey(), CorujaArrayManipulationTest::testGetArrayFieldWithNoneExistingKeyAndThirdParameter(), CorujaArrayManipulationTest::testGetArrayFieldWithNullArray(), and CorujaArrayManipulationTest::testGetArrayFieldWithNullKey().
00031 { 00032 if ( array_key_exists( $mixKey , $arrElement ) ) 00033 { 00034 return $arrElement[ $mixKey ]; 00035 } 00036 else 00037 { 00038 return $mixNotFound; 00039 } 00040 }
1.5.9